Richard_Li
2017-12-23 22:04
慕课网的链接放到本地上是有问题的,我自己下载了一个链接进来,其他都没问题,就是这个验证状态的图标显示不出来,有人知道怎么回事吗?,代码如下,谢谢各位了
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>表单控件状态——验证状态</title>
<link rel="stylesheet" href="../css/bootstrap.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<h1>示例1</h1>
<form role="form">
<div class="form-group has-success">
<label for="inputSuccess1">成功状态</label>
<input type="text" id="inputSuccess1" placeholder="成功状态" >
</div>
<div class="form-group has-warning">
<label for="inputWarning1">警告状态</label>
<input type="text" id="inputWarning1" placeholder="警告状态">
</div>
<div class="form-group has-error">
<label for="inputError1">错误状态</label>
<input type="text" id="inputError1" placeholder="错误状态">
</div>
</form>
<br>
<br>
<br>
<h1>示例2</h1>
<form role="form">
<div class="form-group has-success has-feedback">
<label for="inputSuccess1">成功状态</label>
<input type="text" id="inputSuccess1" placeholder="成功状态" >
<span class="glyphicon glyphicon-ok form-control-feedback"></span>
</div>
<div class="form-group has-warning has-feedback">
<label for="inputWarning1">警告状态</label>
<input type="text" id="inputWarning1" placeholder="警告状态">
<span class="glyphicon glyphicon-warning-sign form-control-feedback"></span>
</div>
<div class="form-group has-error has-feedback">
<label for="inputError1">错误状态</label>
<input type="text" id="inputError1" placeholder="错误状态">
<span class="glyphicon glyphicon-remove form-control-feedback"></span>
</div>
<div class="form-group has-error has-feedback">
<label for="inputError1">email地址</label>
<input type="text" id="inputError1" placeholder="email地址">
<span class="glyphicon glyphicon-remove form-control-feedback"></span>
</div>
</form>
</body>
</html>
<h3>示例3</h3>
<form role="form">
<div class="form-group has-error has-feedback">
<label class="control-label" for="inputemail">Email地址</label>
<input type="text" class="form-control" id="inputemail" placeholder="Email地址">
<span class="glyphicon glyphicon-remove form-control-feedback"></span>
</div>
</form>
bootstrap的图标需要引用字体文件的。如果将bootstrap下载至本地,则需要同时下载fonts文件才能正常使用图标。直接引用网上的链接http://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css则可以直接使用!
你的fonts文件夹没有导进去吧,里面就是glyphicons-halfling-regular-*等文件
玩转Bootstrap(基础)
314544 学习 · 2275 问题
相似问题