【发布时间】:2016-04-03 00:25:57
【问题描述】:
即使使用占位符定义也无法在占位符之前添加星号 演示如下
HTML:
<input type="text" placeholder="Asterisk Before Placeholder"/>
CSS:
input::-webkit-input-placeholder:before {
content: '*';
}
input:-moz-placeholder:before { /* Firefox 18- */
content: '*';
}
input::-moz-placeholder:before { /* Firefox 19+ */
content: '*';
}
input:-ms-input-placeholder:before {
content: '*';
}
【问题讨论】:
-
类似问题here.
标签: css