Ich versuche, meine Kontrollkästchen mit Font Awesome, die Kontrollkästchen werden automatisch generiert aus einem Plugin I "verwende mit Wordpress ich um Stil haben eine Attrappe, was alles sieht aus wie in JSFiddleWie CSS Ankreuzfelder mit Font Style Super
Es scheint etwas ein bisschen falsch mit meinem CSS zu sein, aber ich kann nicht herausfinden, was.
<div id="sidebar-cards-archive">
<ul>
<li class="cat-item cat-item-12">
<label>
<input type="checkbox" name="ofcards-rarity[]" value="12">Common (223)</label>
</li>
<li class="cat-item cat-item-14">
<label>
<input type="checkbox" name="ofcards-rarity[]" value="14">Epic (40)</label>
</li>
<li class="cat-item cat-item-11">
<label>
<input type="checkbox" name="ofcards-rarity[]" value="11">Free (83)</label>
</li>
<li class="cat-item cat-item-15">
<label>
<input type="checkbox" name="ofcards-rarity[]" value="15">Legendary (36)</label>
</li>
<li class="cat-item cat-item-13">
<label>
<input type="checkbox" name="ofcards-rarity[]" value="13">Rare (84)</label>
</li>
</ul>
</div>
Hier ist die CSS
@import url(//netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css);
#sidebar-cards-archive ul li {
list-style: none;
}
/*** custom checkboxes ***/
input[type=checkbox] {
display:none;
}
/* to hide the checkbox itself */
input[type=checkbox] + label:before {
font-family: FontAwesome;
display: inline-block;
}
input[type=checkbox] + label:before {
content:"\f096";
}
/* unchecked icon */
input[type=checkbox] + label:before {
letter-spacing: 10px;
}
/* space between checkbox and label */
input[type=checkbox]:checked + label:before {
content:"\f046";
}
/* checked icon */
input[type=checkbox]:checked + label:before {
letter-spacing: 5px;
}
/* allow space for check mark */
haben Sie entweder von diesen sah: http://jsfiddle.net/8PYJg/, und dies: http://stackoverflow.com/questions/11223615/how-to-use -Font-fantastisch-für-Checkboxen-etc? – evan
Ja, und das CSS scheint nicht mit meinem HTML zu funktionieren, ich kann das HTML nicht anpassen, da es von einem Plugin ausgegeben wird. – Greenhoe