Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
952 views
in Technique[技术] by (71.8m points)

google chrome - HTML select font-size

I'm having trouble setting HTML <select> font-size on OS X Safari and Chrome. Basically the attribute is ignored, unless I zoom in or out in which case the attribute is magically recognised. Anyone seen the same thing / know of a workaround ? Works fine with OS X Firefox, which leads me to think it's a Webkit issue.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

I just ran into this as well, and found a better solution than -webkit-appearance:none (which looks clunky to me without extra styling). You can make the font size bigger while keeping the standard webkit appearance if you set a border color.

select {
    font-size:1.2em;
    border-color:#999; /* without this, it won't work */
}

Pretty silly, but at least it works, and in both Chrome and Safari.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...