想知道搜索引擎是否会对所有图像都设置为背景图像的页面有任何问题,以及它是否会正确地找到并索引每张图片下的“标题”(即 CSS 内容标签)。我真的不在乎搜索引擎是否找到背景图像,但我想让它们索引标题。
<style>
#cimg {width: 400px; height: 300px; background: #000; padding: 0px;}
#ctxt {font-size: 1.0em; text-align:center;}
#cimg .wc1 {width: 400px; height: 300px; background: url(http://192.168.0.1/pic1.jpg) no-repeat; background-size:contain;}
#ctxt .wc1:before {content: "This is Picture 1";}
#cimg .wc2 {width: 400px; height: 300px; background: url(http://192.168.0.1/pic2.jpg) no-repeat; background-size:contain;}
#ctxt .wc2:before {content: "This is Picture 2";}
</style>
<table>
<tr>
<td>
<div id="cimg"><div class="wc1"></div></div>
<div id="ctxt"><div class="wc1"></div></div>
</td>
<td>
<div id="cimg"><div class="wc2"></div></div>
<div id="ctxt"><div class="wc2"></div></div>
</td>
</tr>
</table>