我使用引导切换插件,特别是这个插件的"自定义文本"示例。在文档中,此示例"自定义文本"以白色边框右侧显示,但该边框未显示。你知道为什么吗?
工作示例:https://jsfiddle.net/w2oy1t1o/1/
.HTML:
<table class="table table-striped table-responsive-sm">
<thead>
<tr>
<th scope="col">Item 0</th>
<th scope="col">Item 2</th>
<th scope="col">Item 3</th>
</tr>
</thead>
<tbody>
<tr>
<td>Name</td>
<td>
<input type="checkbox" checked data-toggle="toggle" data-on="Ready" data-off="Not Ready" data-onstyle="success" data-offstyle="danger">
</td>
<td>
<input type="checkbox" checked data-toggle="toggle" data-on="Ready" data-off="Not Ready" data-onstyle="success" data-offstyle="danger">
</td>
</tr>
<tr>
<td>Surname</td>
<td>
<input type="checkbox" checked data-toggle="toggle" data-on="Ready" data-off="Not Ready" data-onstyle="success" data-offstyle="danger">
</td>
<td>
<input type="checkbox" checked data-toggle="toggle" data-on="Ready" data-off="Not Ready" data-onstyle="success" data-offstyle="danger">
</td>
</tr>
</tbody>
</table>
您必须包含引导样式表才能获得样式。
在head
中添加此行: <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet">
更新的代码:https://jsfiddle.net/w2oy1t1o/7/