Skip to content

Instantly share code, notes, and snippets.

@Gavin-YYC
Gavin-YYC / placeholder.css
Last active August 9, 2022 09:03
placeHolder字体大小与input不等时的垂直居中
input {
font-size: 40px;
line-height: 1;
}
/* 比如placeholder字体大小为24px */
input::-webkit-input-placeholder {
font-size: 40px;
transform: scale(.6);
transform-origin: left center;
}