我有一个带有渐变边框的输入字段,但是里面的文本太靠近它了。而且我已经尝试过padding-left
,但是这会使左侧的边框变大,并且文本仍然靠近边框。
输入字段的图片:
.inputfield {
margin-top: 5px;
-moz-appearance: none;
outline:0;
width: 170px;
height: 40px;
font-family: 'Montserrat', sans-serif;
color: white;
position: relative;
padding: 5px;
background-color: rgb(11, 15, 31);
border: solid 0.5px transparent;
border-radius: 80px;
background-image: linear-gradient(rgb(11, 15, 31), rgb(11, 15, 31)), radial-gradient(circle at top
left, rgb(76, 133, 242),rgb(144, 104, 235));
background-origin: border-box;
background-clip: content-box, border-box;
}
简单地在输入[type = text]处添加左填充。