我需要做bootstrap glyphicon复选框
<label class="checkbox-inline"><input type="checkbox" value=""/>
To Download<div class="glyphicon glyphicon-download"></div>
</label>
但我想把glyphicon放到复选框的位置。提前感谢您的回答
答案 0 :(得分:1)
试试这个会起作用..
工作代码段
.glyphicon:before {
visibility: visible;
}
.glyphicon.glyphicon-download:checked:before {
content: "\e013";
}
input[type=checkbox].glyphicon{
visibility: hidden;
}
&#13;
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
</head>
<body>
<label class="checkbox-inline"><input type="checkbox" class="glyphicon glyphicon-download" value=""/>
To Download
</label>
</body>
</html>
&#13;