
[英]How to center placeholder/input text in an input field, but keep the cursor left aligned
[英]How to center input but have placeholder on the left?
我目前有一个输入文本居中对齐的组件。 占位符 cursor 也居中对齐,因此它位于占位符“0”的中间,如何将它移到 0 的左侧?
我的组件:
const StyledBaseInput = styled.input`
text-align: center;
font-size: 72px;
`;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.