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标签上,内部不能包含文本内容或子元素。
本文介绍了Bootstrap3中如何调整图片大小及使用内置的小图标(Glyphicons)。通过样式设置实现图片尺寸变化,并详细解析了Glyphicons图标加载原理及使用方法。

967

被折叠的 条评论
为什么被折叠?



