input
I wanted the placeholder character size of the tag to be smaller than the normal input character size.
Therefore, we applied the following css.
input{
max-height —40px;
padding —8px;
font-size: 32px;
}
input::placeholder {
font-size: 16px;
}
When I looked at the input in this style, I found that the placeholder in Safari, Firefox was placed in the upper and lower center, but Chrome had the placeholder placed slightly below the upper and lower center.
As a result, Chrome is up and down in the center, but this time Safari's placeholder is placed above the center.
input{
max-height —40px;
padding —8px;
font-size: 32px;
}
input::placeholder {
font-size: 16px;
}
input::- webkit-input-placeholder
position:relative;
top : -4px;
}
Google Chrome is like placing placeholders along a perimeter baseline, so it's hard to say it's funny.
vertical-align:middle
doesn't seem to work either, so
position:relative;top:-4px
only for Google ChromeI think that would be fine.
© 2024 OneMinuteCode. All rights reserved.