html - With Bootstrap, how do I show radio inputs as buttons? -
my form contains code:
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"/> <label for="opt-0"><input type="radio" name="opt" id="opt-0" checked>option 0</label> <label for="opt-1"><input type="radio" name="opt" id="opt-1">option 1</label> <label for="opt-2"><input type="radio" name="opt" id="opt-2">option 2</label>
instead of showing radio buttons radio buttons, i'd make them regular buttons, this:
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"/> <button class="btn btn-primary">option 0</button> <button class="btn btn-default">option 1</button> <button class="btn btn-default">option 2</button>
i have radios , want make them toggleable buttons. how supposed bootstrap?
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"/> <div class="btn-group" data-toggle="buttons"> <label class="btn btn-primary"> <input type="radio" name="options" id="option1"> option 1 </label> <label class="btn btn-primary"> <input type="radio" name="options" id="option2"> option 2 </label> <label class="btn btn-primary"> <input type="radio" name="options" id="option3"> option 3 </label> </div>
Comments
Post a Comment