bootstrap4.0图标使用_Bootstrap4 glyphicon 移除图标 glyphicon fonts-faces 解决方案

bootrap3是支持的图标 ,4不支持

115e874c17480bec54be9de1fb87a148.png

4已经移除了 收费图标,取而代之建议使用其他的,比如 https://octicons.github.com/ 和http://fontawesome.io/ 但是3和4我都用过的,直接扣下了3里面的部分。

如图目录结构:

baf669f633c49984468e4eff97be2b8f.png

您可以将一下代码copy到您引入的bootstrap-4.0.0-dist/css/bootstrap.css 文件中

注意:(注意:如下代码依赖glyphicons-.eot、glyphicons-.ttf、glyphicons-*.svg 文件)

@font-face {

font-family: 'Glyphicons Halflings';

src: url('../fonts/glyphicons-halflings-regular.eot');

src: url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('../fonts/glyphicons-halflings-regular.woff2') format('woff2'), url('../fonts/glyphicons-halflings-regular.woff') format('woff'), url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg');

}

.glyphicon {

position: relative;

top: 1px;

display: inline-block;

font-family: 'Glyphicons Halflings';

font-style: normal;

font-weight: normal;

line-height: 1;

-webkit-font-smoothing: antialiased;

-moz-osx-font-smoothing: grayscale;

}

.glyphicon-asterisk:before {

content: "\002a";

}

.glyphicon-plus:before {

content: "\002b";

}

.glyphicon-euro:before,

.glyphicon-eur:before {

content: "\20ac";

}

.glyphicon-minus:before {

content: "\2212";

}

.glyphicon-cloud:before {

content: "\2601";

}

.glyphicon-envelope:before {

content: "\2709";

}

.glyphicon-pencil:before {

content: "\270f";

}

.glyphicon-glass:before {

content: "\e001";

}

.glyphicon-music:before {

content: "\e002";

}

.glyphicon-search:before {

content: "\e003";

}

.glyphicon-heart:before {

content: "\e005";

}

.glyphicon-star:before {

content: "\e006";

}

.glyphicon-star-empty:before {

content: "\e007";

}

.glyphicon-user:before {

content: "\e008";

}

.glyphicon-film:before {

content: "\e009";

}

.glyphicon-th-large:before {

content: "\e010";

}

.glyphicon-th:before {

content: "\e011";

}

.glyphicon-th-list:before {

content: "\e012";

}

.glyphicon-ok:before {

content: "\e013";

}

.glyphicon-remove:before {

content: "\e014";

}

.glyphicon-zoom-in:before {

content: "\e015";

}

.glyphicon-zoom-out:before {

content: "\e016";

}

.glyphicon-off:before {

content: "\e017";

}

.glyphicon-signal:before {

content: "\e018";

}

.glyphicon-cog:before {

content: "\e019";

}

.glyphicon-trash:before {

content: "\e020";

}

.glyphicon-home:before {

content: "\e021";

}

.glyphicon-file:before {

content: "\e022";

}

.glyphicon-time:before {

content: "\e023";

}

.glyphicon-road:before {

content: "\e024";

}

.glyphicon-download-alt:before {

content: "\e025";

}

.glyphicon-download:before {

content: "\e026";

}

.glyphicon-upload:before {

content: "\e027";

}

.glyphicon-inbox:before {

content: "\e028";

}

.glyphicon-play-circle:before {

content: "\e029";

}

.glyphicon-repeat:before {

content: "\e030";

}

.glyphicon-refresh:before {

content: "\e031";

}

.glyphicon-list-alt:before {

content: "\e032";

}

.glyphicon-lock:before {

content: "\e033&#

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Bootstrap Table 是一个基于 Bootstrap 的强大的、响应式的表格插件,它具有丰富的功能和灵活的配置选项。在使用 Bootstrap Table 时,有时需要重载表格来更新数据或者重新渲染表格。下面是关于如何重载 Bootstrap Table 的使用教程: 1. 获取 Bootstrap Table 对象 在重载 Bootstrap Table 之前,需要先获取 Bootstrap Table 对象。可以通过以下方式获取: ```javascript var table = $('#table').bootstrapTable('getOptions'); ``` 其中,'#table' 是你的表格的 ID,可以根据你的实际情况进行修改。 2. 重载 Bootstrap Table 重载 Bootstrap Table 的方法有多种,以下是其中的两种常用方法: (1)使用 load 方法 load 方法可以重新加载表格数据并重新渲染表格,可以通过以下方式调用: ```javascript $('#table').bootstrapTable('load', data); ``` 其中,data 是你要重新加载的数据,可以是一个数组或者是一个 URL。 (2)使用 refresh 方法 refresh 方法可以重新渲染表格,但不会重新加载数据。可以通过以下方式调用: ```javascript $('#table').bootstrapTable('refresh', {silent: true}); ``` 其中,{silent: true} 参数表示不显示刷新动画效果。 3. 完整示例 下面是一个完整的示例,演示如何重载 Bootstrap Table: ```javascript // 获取 Bootstrap Table 对象 var table = $('#table').bootstrapTable('getOptions'); // 重新加载数据 $.ajax({ url: '/data', type: 'get', dataType: 'json', success: function(data) { // 重新加载数据 $('#table').bootstrapTable('load', data); } }); // 重新渲染表格 $('#table').bootstrapTable('refresh', {silent: true}); ``` 在这个示例中,首先通过 getOptions 方法获取 Bootstrap Table 对象,然后使用 jQuery 的 ajax 方法重新加载数据,最后使用 refresh 方法重新渲染表格。 希望这个使用教程对你有所帮助。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值