如何设置禁用复选框的样式? [英] How to style a disabled checkbox?

查看:103
本文介绍了如何设置禁用复选框的样式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您知道在禁用复选框时如何设置复选框的样式吗?



例如:



<$ p $
id =exfilter_All_Terrain_Vehicle
class =p> < exfilterdisabled =>


解决方案

使用css

 输入[disabled] {
outline:1px solid red; //或任何
}


  input [type = checkbox] [disabled] {
outline:1px solid red; //或任何
}

http://www.jsfiddle.net/gaby/pxKcR/2/


Do you know how I could style a checkbox when it is disabled?

E.g.:

<input type="checkbox" value="All Terrain Vehicle"
       name="exfilter_All Terrain Vehicle"
       id="exfilter_All_Terrain_Vehicle"
       class="exfilter" disabled="">

解决方案

Use the attribute selector in the css

input[disabled]{
  outline:1px solid red; // or whatever
}

for checkbox exclusively use

input[type=checkbox][disabled]{
  outline:1px solid red; // or whatever
}

example at http://www.jsfiddle.net/gaby/pxKcR/2/

这篇关于如何设置禁用复选框的样式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆