文章“使用内联精灵图创建可访问的 SVG 图标”的直链

使用内联精灵图创建可访问的 SVG 图标

这是 Marco Hengstenberg 对可访问的 SVG 标记模式的精彩介绍。以下是理想示例

<button type="button">
  Menu
  <svg class="svg-icon"
     role="img"
     height="10"
     width="10"
     viewBox="0 0 10 10"
     aria-hidden="true"
     focusable="false">
     <path d="m1 7h8v2h-8zm0-3h8v2h-8zm0-3h8v2h-8z"></path>
    </svg>
</button>
Avatar of Chris Coyier
Chris Coyier 发表于