我一直在下面僅使用CSS3和這裏的造型複選框教程就是我想出了:爲什麼我不能進入CSS3複選框?
DEMO:
http://cssdeck.com/labs/jaoe0azx
複選框被風格就好了 - 但是當我通過TAB鍵窗體控件 - >複選框正在跳過。任何建議爲什麼?
HTML:
<form role="form" id="login_form" data-mode="login">
<div class="form-group">
<label for="ue">Username or email:</label>
<input type="email" class="form-control input-lg" name="ue" id="ue" placeholder="" />
</div>
<div class="form-group">
<label for="password">Password:</label>
<input type="password" class="form-control input-lg" name="password" id="password" placeholder="" />
</div>
<div>
<input id="rememberme" type="checkbox" name="rememberme" value="1" class="checkbox_1" tabindex="0" />
<label for="rememberme" class="checkbox_1" tabindex="0">remember me</label>
</div>
<div id="auth_area_login_button">
<button class = "btn btn-lg btn-primary">
Login
</button>
</div>
</form>
CSS:
@import url('//netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css');
#login_form{padding:20px;}
label.checkbox_1 {
display: inline-block;
cursor: pointer;
position: relative;
padding-left: 25px;
margin: 0px;
}
label.checkbox_1:before {
content: "";
display: inline-block;
width: 16px;
height: 16px;
margin-right: 10px;
position: absolute;
left: 0;
bottom: 1px;
background-color: #fff;
border: 1px solid #ccc;
border-radius: 0px;
}
label.checkbox_1:hover:before{border-color:#66afe9;}
input[type=checkbox].checkbox_1 {
display: none;
}
input[type=checkbox].checkbox_1:checked + label.checkbox_1:before {
content: "\2713";
font-size: 15px;
color: #A0A0A0;
text-align: center;
line-height: 15px;
}
編輯1:
似乎在Firefox的工作,但不是在鉻...
你好,請出示在這裏一些相關的代碼。謝謝! ([這裏](http://meta.stackexchange.com/questions/125997/something-in-my-web-site-or-project-doesnt-work-can-i-just-paste-a-link-to -it/126000#126000)why) –
至少在最新的Firefox(26.0)上按下密碼字段上的選項卡後似乎獲得焦點,但我無法在空格鍵中檢查它,如在「正常」複選框中。 –
嗯。是的 - 在Firefox中工作,而不是鉻... – Dannyboy