div+css 鼠标移到图片上显示文字内容

 时间:2024-10-13 12:24:53

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*/

div+css 鼠标移到图片上显示文字内容

3、然后输入:

</style>

</head>

<body>

<divclass="divcss5"style="background:url(imgexp.png)">

<span>文字内容</span>

<ahref="#"class="now">&nbsp;</a>

</div>

<divclass="divcss5"style="background:url(imgexp.png)">

<span>欢迎访问DIVCSS5网站</span>

<ahref="http://www.divcss5.com/"class="now">&nbsp;</a>

</div>

</body>

</html>

div+css 鼠标移到图片上显示文字内容

  • a标签的下划线怎么去掉
  • 怎样让html中的文字垂直水平居中显示
  • HTML怎么添加滚动条
  • 如何让图片在div中居中显示
  • 通过CSS+DIV怎么将文字写在图片上方
  • 热门搜索
    俄罗斯旅游报价 九江旅游 康辉旅游 常州旅游景点 贵州旅游最佳路线 江苏旅游景点 大连旅游攻略 云南旅游攻略自由行 韩国旅游多少钱 去日本旅游要多少钱