本文概述
- Bootstrap Glyphicon示例
【bootstrap glyphicon用法】Glyphicons的一些示例是:
- 信封字形图标
- 打印字形图标
- 搜索字形图标
- 下载glyphicon等
<
span class="glyphicon glyphicon-name"><
/span>
要创建所需的Glyphicon,必须相应地替换语法的“名称”部分。
例如:如果要创建“信封”字形,则必须编写以下语法:
<
span class="glyphicon glyphicon-envelope"><
/span>
Bootstrap Glyphicon示例让我们举个例子来看一下使用glyphicons的不同方法:
<
!DOCTYPE html>
<
html lang="en">
<
head>
<
title>Bootstrap Example<
/title>
<
meta charset="utf-8">
<
meta name="viewport" content="width=device-width, initial-scale=1">
<
link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<
/head>
<
body><
div class="container">
<
h2>Glyphicon Examples<
/h2>
<
p>Envelope icon: <
span class="glyphicon glyphicon-envelope"><
/span><
/p>
<
p>Envelope icon as a link:
<
a href="http://www.srcmini.com/#"><
span class="glyphicon glyphicon-envelope"><
/span><
/a>
<
/p>
<
p>Search icon: <
span class="glyphicon glyphicon-search"><
/span><
/p>
<
p>Search icon on a button:
<
button type="button" class="btn btn-default">
<
span class="glyphicon glyphicon-search"><
/span> Search
<
/button>
<
/p>
<
p>Search icon on a styled button:
<
button type="button" class="btn btn-info">
<
span class="glyphicon glyphicon-search"><
/span> Search
<
/button>
<
/p>
<
p>Print icon: <
span class="glyphicon glyphicon-print"><
/span><
/p>
<
p>Print icon on a styled link button:
<
a href="http://www.srcmini.com/#" class="btn btn-success btn-lg">
<
span class="glyphicon glyphicon-print"><
/span> Print
<
/a>
<
/p>
<
/div><
script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"><
/script>
<
script src="http://img.readke.com/220416/155R42M3-1.jpg"><
/script>
<
/body>
<
/html>
推荐阅读
- bootstrap轮播组件
- bootstrap图像image
- bootstrap pager用法
- bootstrap分页pagination
- bootstrap panel用法
- bootstrap徽章和标签
- bootstrap well用法
- bootstrap提示框alert
- bootstrap表单form