相关疑难解决方法(0)

使用CSS更改HTML5输入的占位符颜色

Chrome支持占位符属性input[type=text]元素(别人可能做太多).

但以下CSS内容对占位符的值没有任何作用:

input[placeholder], [placeholder], *[placeholder] {
    color: red !important;
}
Run Code Online (Sandbox Code Playgroud)
<input type="text" placeholder="Value">
Run Code Online (Sandbox Code Playgroud)

Value仍然会留下grey而不是red.

有没有办法改变占位符文本的颜色?

html css html5 placeholder html-input

3876
推荐指数
29
解决办法
171万
查看次数

CSS隐藏占位符打印

有没有办法在打印样式表中隐藏输入的占位符文本.我有一个表格,可以选择打印和传真/邮寄.我不知道为什么有人想要这样做,但这就是客户想要的.因此占位符文本在打印文档上的方式.

css printing placeholder html-input

12
推荐指数
1
解决办法
6947
查看次数

标签 统计

css ×2

html-input ×2

placeholder ×2

html ×1

html5 ×1

printing ×1