dimanche 18 janvier 2015

How can I have a visually active (checked), disabled toggle button in Bootstrap?

Bootply


I have a data-toggle checkbox group, where I'd like one (or more) of the options to be checked, yet disabled.


Is there a built-in visual style, or would I need custom CSS? This doesn't seem to work:



<div class="btn-group" data-toggle="buttons">

<label class="btn btn-primary disabled">
<input class="form-control" name="beard" value="fluffy" disabled="" type="checkbox"> Fluffy
</label>

<label class="btn btn-primary disabled">
<input class="form-control" name="beard" value="scraggly" disabled="" type="checkbox"> Scraggly
</label>

<label class="btn btn-primary active disabled">
<input class="form-control" name="beard" value="pointy" disabled="" checked="" type="checkbox"> Pointy
</label>

</div>


Functionally, I suppose the last option is checked, but visually it appears no differently than the disabled options.


Must avoid using any additional JS.





Aucun commentaire:

Enregistrer un commentaire