div+css 鼠标移到图片上显示文字内容
1、首先输入:
<!DOCTYPEhtml>
<html>
媪青怍牙<head>
<metacharset="utf-8"/>
<title>鼠标悬停图片上显示文字在线演示www.divcss5.com</title>
<style>
img{border:0}/*css注释说明:设置图片边框为0*/
body{behavior:url("csshover.htc");text-align:center;}/*css注释说明:兼容ie6支持标签使用hover*/
3、然后输入:
</style>
</head>
<body>
<divclass="divcss5"style="background:url(imgexp.png)">
<span>文字内容</span>
<ahref="#"class="now"> </a>
</div>
<divclass="divcss5"style="background:url(imgexp.png)">
<span>欢迎访问DIVCSS5网站</span>
<ahref="http://www.divcss5.com/"class="now"> </a>
</div>
</body>
</html>