经典论坛's Archiver

skybot 发表于 2008-8-29 09:54

求以前看到的一个效果

这个效果是这样的

当 鼠标移到字上,在字的下面出一框子,鼠标可以移到框子上点击,操作等,
当 鼠标移出框子后,过一会框子就不见了

caiying2007 发表于 2008-8-29 13:18

以前收藏 (本论坛?) 的,小改了一下子:D
[attach]98682[/attach]

[[i] 本帖最后由 caiying2007 于 2008-8-29 13:20 编辑 [/i]]

skybot 发表于 2008-9-3 13:33

谢谢楼主,我自己写了个.

[url]http://bbs.blueidea.com/thread-2882556-1-1.html[/url]

marvellous 发表于 2008-9-3 13:36

[html]<!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>A的自动提示信息</title>
<style type="text/css">
body{font-size:12px; line-height:18px}
a{ position:relative;text-decoration:none; color: #FF6600 }
#show{
display:none;
position:absolute;
top:14px;
left:1px;
border:#999 dashed 1px;
background-color: #f5f5f5;
text-align:left;
padding:2px 5px;
width:80px;
overflow:hidden;
line-height:15px;
height:15px;
z-index:99;
color:#666
}
</style>
</head>
<body>
<center>当鼠标<a href="#" alt="<marquee behavior=alternate><font color=blue>看见我了吗
</font></marquee>">放在链接上</a>的时候,其<a href="#" alt="<marquee
behavior=alternate><font color=green>看见了</font></marquee>">提示信息</a>就会显示 出来
<script type="text/javascript">
var links=document.getElementsByTagName("a");
for(i=0; i<links.length;i++) {
                 links[i].onmouseover=function(){
                         var a_tip=document.createElement("span");
                         var a_tit=this.getAttribute("alt");
                         a_tip.innerHTML=a_tit;
                         this.appendChild(a_tip);
                         a_tip.setAttribute("id","show");
                         a_tip.style.display="block";
                         this.onmouseout=function(){
                                 a_tip.style.display="none";
        }         }
}
</script>[/html]

页: [1]



Powered by Discuz! Archiver 6.1.0  © 2001-2007 Comsenz Inc.