`

Bootstrap v3--图标

 
阅读更多
图标可以应用到按钮、工具条中的按钮组、导航或输入框等地方。注意:
1.为了设置正确的内补padding,要在图标和文本间添加一个空格
2.不能和其他组件联合使用,不能在同一个元素上与其他类同在。
3.只对内容为空的元素起作用,元素应不包含任何文本或者子元素。

aria-hidden="true" 属性:避免屏幕识读设备抓取非故意的和可能产生混淆的输出内容
aria-label属性:表示这个控件的意图,这样就能让使用辅助设备的用户知道其作用

<button type="button" class="btn btn-default" aria-label="Left Align">
  <span class="glyphicon glyphicon-align-left" aria-hidden="true"></span>
</button>


使用图标是为了表达某些含义而不仅仅是为了装饰用,.sr-only 类让其在视觉上表现出隐藏的效果:
<div class="alert alert-danger" role="alert">
  <span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span>
  <span class="sr-only">Error:</span>
  Enter a valid email address
</div>


http://v3.bootcss.com/components/#glyphicons
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics