如何为背景图片提供 alt 和标题?可能吗?
<div id="cont"></div>
#cont
{
background:#FFF url(../images/post.png) no-repeat;
}
最佳答案
您不能为 css 背景提供 alt 和标题,但可以为 div 提供标题。
<div id="cont" title="Title!"></div>
标题将在鼠标悬停在 div 元素上时弹出。
关于html - 如何为背景图片提供 alt 和标题?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11774984/