开发者

Text equivalents for icons that using css background-image property

If the element is not rendered successfully, the text equivalent will be displayed.

For开发者_如何转开发 the <img> tags, we could use ALT attributes to represent the text equivalents. But things get complicated when the image is rendered as <span> + background-image css property. Since ALT attribute is only meaningful for <img>, it couldn't be used here.

What should I do to create text equivalent for them?


You can use the title attribute.

See this and this for details.

<span title="my text" class="anImageClass"></span>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜