Change an HTML5 input's placeholder color with CSS

后端 未结 30 3071
猫巷女王i
猫巷女王i 2020-11-21 04:36

Chrome supports the placeholder attribute on input[type=text] elements (others probably do too).

But the following CSS doesn\'t do anything

30条回答
  •  礼貌的吻别
    2020-11-21 05:05

    In addition to toscho's answer I've noticed some webkit inconsistencies between Chrome 9-10 and Safari 5 with the CSS properties supported that are worth noting.

    Specifically Chrome 9 and 10 do not support background-color, border, text-decoration and text-transform when styling the placeholder.

    The full cross-browser comparison is here.

提交回复
热议问题