如何使用 Glyphicons
通常来讲,咱们能够得出经过 Bootstrap 3 使用 Glyphicons 的常见语法以下html
<span class="glyphicon glyphicon-*"></span>
" * " 能够是任意表明特定图标的关键词。下面的实例演示了如何经过按钮使用它。bootstrap
<button type="button" class="btn btn-primary btn-lg"> <span class="glyphicon glyphicon-user"></span> User </button>
定制字体尺寸
经过增长或减小图标的字体尺寸,也能够让图标看起来更大或更小。ide
<button type="button" class="btn btn-primary btn-lg" style="font-size: 60px"> <span class="glyphicon glyphicon-user"></span> User </button>
下面顺便介绍一下Bootstrap的按钮this
<!-- Standard button --> <button type="button" class="btn btn-default">Default</button> <!-- Provides extra visual weight and identifies the primary action in a set of buttons --> <button type="button" class="btn btn-primary">Primary</button> <!-- Indicates a successful or positive action --> <button type="button" class="btn btn-success">Success</button> <!-- Contextual button for informational alert messages --> <button type="button" class="btn btn-info">Info</button> <!-- Indicates caution should be taken with this action --> <button type="button" class="btn btn-warning">Warning</button> <!-- Indicates a dangerous or potentially negative action --> <button type="button" class="btn btn-danger">Danger</button> <!-- Deemphasize a button by making it look like a link while maintaining button behavior --> <button type="button" class="btn btn-link">Link</button>
代码效果以下:spa
参考地址:
Glyphicons图标教程
Bootstrap按钮效果教程code