【发布时间】:2013-08-06 20:18:01
【问题描述】:
我一直在尝试让自定义复选框与我的网站一起使用。但是,我的 HTML 的特定部分遇到了一个令人费解的问题。
这是我当前的代码: HTML
<div class="quicklinks_login">
<label for="cookieuser" style="padding-left: 7px;"><input type='checkbox' name='cookieuser' value='1' tabindex='10' id='cb_cookieuser_navbar' accesskey='c' /> Remember Me</label>
</div>
CSS
input[type="checkbox"] + label,
label > input[type="checkbox"] {
background: url("../images/override/state_off.png") no-repeat scroll 0 0 transparent;
cursor: pointer;
}
现在,您可以从我的 CSS 中看到,我有两个想要设置样式的模式。标签 > input[type="checkbox"] 'pattern' 应该 应用于我的 HTML(根据 FireBug 就是这样)。但是,自定义图像不会与复选框一起显示。
总而言之,我的问题很简单:为什么“模式”label > input[type="checkbox"] 不适用于我的 HTML?
【问题讨论】: