鼠标经过显示文字说明代码
狸窝 复制 收藏 保存到桌面 快速找教程方案 反馈需求 社会主义核心价值观 在线客服 马上注册 升级VIP
鼠标经过文字显示说明 :
<a title="要显示的文字">link</a>
<span title="要显示的文字">span</span>
<div title="要显示的文字">div</div>
.......
好多的标签都支持的
如果是图片还可以用<img alt="要显示的文字" src="你的图片">
鼠标经过文字时显示图片说明:
方法一:<CSS实现>推荐
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>鼠标经过效果</title>
</head>
<body>
<style type="text/css">
.thumbnail{
position: relative;
z-index: 0;
}
.thumbnail:hover{
background-color: transparent;
z-index: 50;
}
.thumbnail span{
position: absolute;
padding: 1px;
left: -1000px;
visibility: hidden;
color: black;
text-decoration: none;
}
.thumbnail span img{
border-width: 0;
padding: 2px;
}
.thumbnail:hover span{
visibility: visible;
top: 17px;
left: 55px;
}
</style>
<a class="thumbnail" href="">鼠标点击这里
<span><img src="http://www.guangjiezu.com/images2/dxxpic.gif" width="165" height="26" border="0"></span>
</a>
</body>
</html>
注释:“鼠标点击这里”===》图片效果为:
<a class="thumbnail"><img src="/images/duanxiaoxi.gif" border="0" onClick="showDiv(this)"><span><img src="/images2/dxxpic.gif" width="165" height="26" border="0"></span></a>
方法二:<JS实现>不推荐
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns=" http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>JS实现-鼠标经过文字时显示图片</title>
<script language="javascript">
function display1()
{
b.style.display="block";
}
function display2()
{
b.style.display="none";
}
</script>
</head>
<body>
<a href="#" onmouseover="display1()" onmouseout="display2()">鼠标移上来吧</a>
<img id="b" src="http://www.guangjiezu.com/images2/dxxpic.gif" alt="" title="" style="display:none" />
</body>
</html>
<a title="要显示的文字">link</a>
<span title="要显示的文字">span</span>
<div title="要显示的文字">div</div>
.......
好多的标签都支持的
如果是图片还可以用<img alt="要显示的文字" src="你的图片">
鼠标经过文字时显示图片说明:
方法一:<CSS实现>推荐
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>鼠标经过效果</title>
</head>
<body>
<style type="text/css">
.thumbnail{
position: relative;
z-index: 0;
}
.thumbnail:hover{
background-color: transparent;
z-index: 50;
}
.thumbnail span{
position: absolute;
padding: 1px;
left: -1000px;
visibility: hidden;
color: black;
text-decoration: none;
}
.thumbnail span img{
border-width: 0;
padding: 2px;
}
.thumbnail:hover span{
visibility: visible;
top: 17px;
left: 55px;
}
</style>
<a class="thumbnail" href="">鼠标点击这里
<span><img src="http://www.guangjiezu.com/images2/dxxpic.gif" width="165" height="26" border="0"></span>
</a>
</body>
</html>
注释:“鼠标点击这里”===》图片效果为:
<a class="thumbnail"><img src="/images/duanxiaoxi.gif" border="0" onClick="showDiv(this)"><span><img src="/images2/dxxpic.gif" width="165" height="26" border="0"></span></a>
方法二:<JS实现>不推荐
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns=" http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>JS实现-鼠标经过文字时显示图片</title>
<script language="javascript">
function display1()
{
b.style.display="block";
}
function display2()
{
b.style.display="none";
}
</script>
</head>
<body>
<a href="#" onmouseover="display1()" onmouseout="display2()">鼠标移上来吧</a>
<img id="b" src="http://www.guangjiezu.com/images2/dxxpic.gif" alt="" title="" style="display:none" />
</body>
</html>
狸窝是帮助用户解决问题 提供教程解决方案 在这个过程中有使用我们自己开发的软件 也有网上找的工具 只要帮助用户解决问题就好!在这个过程中我们的教程方案写作老师比较辛苦 有时为了一个教程要试验测试好几天及连续加班多日, 而大家的赞赏是一种肯定和表扬 不在于多少|打赏随意|只要你开心, 更像征一种鞭策和鼓励!!!
群组话题
- 在女人上面怎么成为真正的男人 1个简单易行的方法揭秘 男人必看! 帮助用户解决问题
- Leawo 藍光到 DVD 轉檔器能以超越同業 6 倍的速度,將藍光內容轉換為 DVD 光碟 光碟複製為光碟/ISO檔
- Leawo 藍光轉檔器支援將藍光影片轉換為 MKV、MP4、AVI 等 180+ 種格式 光碟複製為光碟/ISO檔
- Leawo 藍光播放器 支援多種格式,包括 DVD、藍光與 4K UHD 藍光 光碟複製為光碟/ISO檔
- CleverGet:多合一線上影片下載工具 光碟複製為光碟/ISO檔
- Leawo 藍光 Cinavia 消除器的核心功 光碟複製為光碟/ISO檔
- 影片燒錄 DVD:如何將 MP4 影片燒錄到 DVD? 光碟複製為光碟/ISO檔
- 複製與備份藍光/DVD 光碟,並支援多種輸出格式與複製模式 视频转换器
- Leawo 影片轉檔器終極版(Prof. Media DVD 媒體包) 光碟複製為光碟/ISO檔
- 如何替换GIF图片中的广告或LOGO,添加自己的个性化标签,让你的GIF更具创意! 视频转换器
- 如何解除视频的隔行扫描,隔行扫描将每一帧分为两场,分别扫描奇数行和偶数行 视频转换器