如何使用CSS样式readonly属性? [英] How to style readonly attribute with CSS?
本文介绍了如何使用CSS样式readonly属性?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我目前使用readonly =readonly来禁用字段。我现在试图使用CSS样式的属性。我已尝试使用
I'm currently using readonly="readonly" to disable fields. I'm now trying to style the attribute using CSS. I've tried using
input[readonly] {
/*styling info here*/
}
但由于某种原因它不工作。我也尝试过
but it is not working for some reason. I've also tried
input[readonly='readonly'] {
/*styling info here*/
}
不起作用。
如何用CSS样式化readonly属性?
How can I style the readonly attribute with CSS?
推荐答案
input[readonly]
{
background-color:blue;
}
http://jsfiddle.net/Curt/uzyH5/1033/
这篇关于如何使用CSS样式readonly属性?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文