我想要改变象形文字的高度和宽度-注释以及如何在图标内显示文本-注释。我使用预定义的注释,这是存在于bootstrap.when中的,我试图通过使用内联样式来更改高度和宽度,如果我更改注释的颜色,则不是working.but。
这是我的密码。
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container">
<div class="panel panel-info">
<div class="panel-heading">Learn by doing</div>
<div class="panel-body">Each computer has a built-in instruction set that it knows how to execute by design.
<form id="myForm">
<span class="glyphicon glyphicon-comment" onclick="radiotruehintbox()"></span>
<div class="radio">
<label><input type="radio" id="true" onclick="radiotruehintbox()">True</label>
</div>
<div class="radio">
<label><input type="radio" id="false" onclick="radiofalsehintbox()">False</label>
</div>
<div class="alert alert-success alert-dismissible" id="truebox" style= display:none>
<div class="close" data-dismiss="alert" aria-label="close">×</div>
<strong>✔</strong> This alert box could indicate a successful or positive action.
</div>
<div class="alert alert-danger alert-dismissible" id="falsebox" style= display:none>
<div class="close" data-dismiss="alert" aria-label="Close">×</div>
<strong>✘</strong> This alert box could indicate a dangerous or potentially negative action.
</div>
<p>computer uses intelligence to execute instructions.</p>
<span class="glyphicon glyphicon-comment" onclick="radiofalsehintbox()"></span></p>
<div class="radio">
<label><input type="radio" id="true_2" onclick="radiohintbox()">True</label>
</div>
<div class="radio">
<label><input type="radio" name="optradio">False</label>
</div>
</form>
<button type="button" class="btn btn-primary btn-md" OnClick="ResetClick()" >Reset </button>
</div>
</div>
</div>
<script>
function radiotruehintbox() {
document.getElementById("false").checked = false;
document.getElementById('falsebox').style.display='none';
document.getElementById('truebox').style.display='block';
}
function radiofalsehintbox() {
document.getElementById("true").checked = false;
document.getElementById('truebox').style.display='none';
document.getElementById('falsebox').style.display='block';
}
function ResetClick() {
document.getElementById("myForm").reset();
document.getElementById("truebox").reset();
document.getElementById("falsebox").reset();
}
</script>
</body>
</html>发布于 2018-03-14 10:32:07
使用字体大小来增加像这样的图标的大小-
.glyphicon-comment{
font-size: 24px
}你不能在象形文字里写字。
https://stackoverflow.com/questions/49275263
复制相似问题