Phi*_*hil 14 html css twitter-bootstrap
当我按下No按钮时,我希望它变成红色.我希望Yes按钮的行为与它已经完成的方式相同,即.什么是limegreen active.我该怎么做呢?
请看我的小提琴
HTML
<div class="col-sm-5 btn-group" data-toggle="buttons">
<label class="btn btn-info">
<input checked="checked" name="media_release" value="1" type="radio"> Yes
</label>
<label class="btn btn-info active">
<input name="media_release" value="0" type="radio"> No
</label>
</div>
Run Code Online (Sandbox Code Playgroud)
CSS
.btn-info.active {
background-color: limegreen;
}
Run Code Online (Sandbox Code Playgroud)
小智 12
.btn-info.active {
background-color: limegreen;
}
.btn_red.active {
background-color: red;
}Run Code Online (Sandbox Code Playgroud)
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div class="col-sm-5 btn-group" data-toggle="buttons">
<label class="btn btn-info">
<input checked="checked" name="media_release" value="1" type="radio"> Yes
</label>
<label class="btn btn-info btn_red">
<input name="media_release" value="0" type="radio"> No
</label>
</div>Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
29998 次 |
| 最近记录: |