0
我想重寫angular.js中的checkbox css。它對於正常的javascript代碼工作正常。無法重寫angularjs中的複選框
Plunker:https://plnkr.co/edit/gkWm0lgEZ7N88TINcsRS?p=preview
如果您刪除的CSS它工作正常。
<input type="checkbox" ng-model="checkboxModel.value1" >
CSS:
input[type=checkbox]:checked + label:before {
content: '';
text-shadow: 1px 1px 1px #10758C;
font-size: 24px;
color: #f3f3f3;
text-align: center;
line-height: 24px;
background: url('http://cnt.in.bookmyshow.com/bmsin/SLIMG/1_4.gif') !important;
}
label {
display: inline-block;
cursor: pointer;
position: relative;
padding-left: 28px;
margin-right: 12px;
font-size: 16px;
line-height: 22px;
font-weight: bold;
}
input[type=radio], input[type=checkbox] {
display: none;
}
label:before {
font-weight: normal;
content: '';
display: inline-block;
width: 18px;
height: 18px;
margin-right: 10px;
position: absolute;
left: 0;
bottom: 1px;
background: url('http://cnt.in.bookmyshow.com/bmsin/SLIMG/1_1.gif?v1');
}
input [type = radio],input [type = checkbox] { display:none; } – Kenny
以上CSS的目的是什麼? – Kenny
要隱藏原始複選框,即隱藏複選框的框 –