关闭按钮
为 <button>
或 <a>
元素添加 .close
类,就会为它赋予一个象征关闭的图标,点击图标,就可以让模态框和警告框消失。如:
<button type="button" class="close" aria-label="Close"><span aria-hidden="true">×</span></button>
<a class="close"><span aria-hidden="true">×</span></a>
效果如图 2‑82所示:
图2-82 关闭按钮
关于作者
歪脖先生,十五年以上软件开发经验,酷爱Web开发,精通 HTML、CSS、JavaScript、jQuery、JSON、Python、Less、Bootstrap等,著有《HTML宝典》、《揭秘CSS》、《Less简明教程》、《JSON教程》、《Bootstrap2用户指南》、《Bootstrap3实用教程》,并全部在 GitHub 上开源。