I m make fluent style input bar and this is my progress
但是,我希望其行程不会四舍五入,而当着重点时,它会改变其高度(改变布局)。
我怎么办?
这是我的法典。
body {
background-color: #1a2228;
}
input {
background: #272f36;
border: 1px solid #282d31;
border-radius: 3px;
width: 10em;
line-height: 1.5em;
outline: none;
color: white;
border-bottom: 1px solid #979a9e;
padding-left: 5px;
transition: 200ms;
}
input::placeholder {
color: #aeaeae;
transition: 200ms;
}
input:hover {
transition: 200ms;
background: #2d343b;
}
input:focus {
background: #1d1f21;
transition: 200ms;
border-bottom: 2px #4cc2ff solid;
}
input:focus::placeholder {
color: #959697;
}
input[type="number"]::-webkit-inner-spin-button {
cursor: pointer;
}
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
-webkit-appearance: none;
}
<input id="a" type="number" min="0" max="100" placeholder="test">
no rounded corner bottom, like microsoft fluent design