鼠标滑过文字时alt显示图片。文章源自两天的博客-https://2days.org/2632.html
代码:文章源自两天的博客-https://2days.org/2632.html
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
- <html>
- <head>
- <STYLE type=text/css>BODY {
- MARGIN-TOP: 0px; FONT-SIZE: 9pt; MARGIN-LEFT: 4px; MARGIN-RIGHT: 0px; FONT-FAMILY: "宋体"
- }
- A {
- FONT-WEIGHT: 400; FONT-SIZE: 13px; COLOR: black; TEXT-DECORATION: none
- }
- A:hover {
- FONT-WEIGHT: 400; FONT-SIZE: 13px; COLOR: red; TEXT-DECORATION: underline
- }
- A:active {
- FONT: 9pt "宋体"; CURSOR: hand; COLOR: #ff0033
- }
- </style>
- <title>Untitled Document</title>
- <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
- </head>
- <body>
- <script>
- function show(tips,flag,url){
- var my_tips=document.all.mytips;
- if(flag){
- my_tips.style.display="";
- if (url!=null){my_tips.innerHTML="<img src='"+url+"'align=left>"+tips;}
- else{ my_tips.innerHTML=tips;}
- my_tips.style.left=event.clientX+10;
- my_tips.style.top=event.clientY+10;
- }
- else
- {
- my_tips.style.display="none";
- }
- }
- </script>
- <a href="#" tips="自定义提示" onmousemove=show(this.tips,1) onmouseout=show(this.tips,0)>测试链接</a>
- <a href="#" tips="又一个自定义提示" onmousemove=show(this.tips,1) onmouseout=show(this.tips,0,'http://www.baidu.com/img/baidu_logo_jr_0808_aykms.gif')>测试链接</a>
- <a href="#" tips="中华人民共和国中华人民共和国自定义提示" onmouseover=show(this.tips,1,'http://www.baidu.com/img/baidu_logo_jr_0808_aykms.gif') onmouseout=show(this.tips,0,'http://www.baidu.com/img/baidu_logo_jr_0808_aykms.gif')>测试链接</a>
- <div id=mytips style="position:absolute;width:150;height:16;border:1 gray solid;font-size:9pt;background-color:#ffffff;color:red;display:none;filter: progid:DXImageTransform.Microsoft.Shadow(color=#999999,direction=135,strength=3);">
- </div>
- </body>
- </html>
本站文章大部分始于原创,用于个人学习记录,可能对您有所帮助,仅供参考!

312379857
微信号已复制
←QQ扫一扫添加QQ好友
版权声明:本站原创文章转载请注明文章出处及链接,谢谢合作!
湖北省 3F
顶上去!顶上去!
广东省汕头市 2F
这个东西很重要吗?
山东省 B1
@ 胖蒜 不算重要,小玩意而已
山东省烟台市 1F
不错
山东省 B1
@ Rememberautumn
” />