Bootstrap 当我在本地主机上复制时,glyphicon 改变了图标
Bootstrap glyphicon changes icon when I copy it on localhost
我用bootstrap显示一个glyphicon图标,网上的link可以正常使用,当我复制bootstrap.min.css到本地时,图标不能正常显示!!!
<link rel="stylesheet" href="bootstrap.css">
<p>Search icon: <span class="glyphicon glyphicon-search"></span></p>
给出:
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<p>Search icon: <span class="glyphicon glyphicon-search"></span></p>
给出:
我想将 css 保留在本地以减少加载时间
您确定为 Bootstrap 的本地副本引用了正确的路径吗?您的 href 指向 bootstrap.css.You 正在谈论 bootstrap.min.css。
检查开发者是否识别bootstrap。那应该提供一些信息。
我认为问题是 bootstrap.min.css 指向同一路径中的 fonts/glyphicons-halflings-regular.woff2
、 fonts/glyphicons-halflings-regular.woff
和 fonts/glyphicons-halflings-regular.ttf
。所以我也必须复制它们:)
谢谢大家
您必须在此 link http://getbootstrap.com/getting-started/#download 上下载 bootstrap 的完整包并放入本地主机文件夹
然后你可以link这样的样式表
<link rel="stylesheet" href="http://127.0.0.1/xxxxxxx/css/bootstrap.min.css">
我想这可能对你有帮助
我用bootstrap显示一个glyphicon图标,网上的link可以正常使用,当我复制bootstrap.min.css到本地时,图标不能正常显示!!!
<link rel="stylesheet" href="bootstrap.css">
<p>Search icon: <span class="glyphicon glyphicon-search"></span></p>
给出:
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<p>Search icon: <span class="glyphicon glyphicon-search"></span></p>
给出:
我想将 css 保留在本地以减少加载时间
您确定为 Bootstrap 的本地副本引用了正确的路径吗?您的 href 指向 bootstrap.css.You 正在谈论 bootstrap.min.css。
检查开发者是否识别bootstrap。那应该提供一些信息。
我认为问题是 bootstrap.min.css 指向同一路径中的 fonts/glyphicons-halflings-regular.woff2
、 fonts/glyphicons-halflings-regular.woff
和 fonts/glyphicons-halflings-regular.ttf
。所以我也必须复制它们:)
您必须在此 link http://getbootstrap.com/getting-started/#download 上下载 bootstrap 的完整包并放入本地主机文件夹
然后你可以link这样的样式表
<link rel="stylesheet" href="http://127.0.0.1/xxxxxxx/css/bootstrap.min.css">
我想这可能对你有帮助