Bootstrap 3.3.7学习笔记10

本文介绍了Bootstrap3中如何调整图片大小及使用内置的小图标(Glyphicons)。通过样式设置实现图片尺寸变化,并详细解析了Glyphicons图标加载原理及使用方法。

Bootstrap 3.3.7学习笔记10

主题:图片
知识点:
1. 改变图片本身大小,可以给img标签加上属性style=”width:500px;height:500px;”,或者是给img标签套上一个父标签
2. bootstrap小图标,来源于 Glyphicons
3. bootstrap实现小图标的原理是通过加载@font-face,代码如下

@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');
}

然后每一个glyphicons类都会用过:before类设定content的代码。

.glyphicon-plus:before {
  content: "\002b";
}

这就是一个加号了。而且图标类推荐使用在span标签上,内部不能包含文本内容或子元素。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值