求网页制作高手

来源:百度知道 编辑:UC知道 时间:2024/05/07 18:10:27
怎么做成鼠标放在上面,就有相应内容显示出来的效果

这个有用没

<html>
<head>
<title>即时出现的提示信息</title>
<style>
#div1{position:absolute;border:1 solid #3366cc;background-color:#d2e8ff;color:blue;width:100;font-size:12px}
a:link {
text-decoration: none;
color: #0033FF;
}
a:visited {
text-decoration: none;
color: #0033FF;
}
a:hover {
text-decoration: underline;
color: #00CCFF;
}
a:active {
text-decoration: none;
color: #0033FF;
}
</style>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"></head>
<!--by fason-->
<body>
<script>
function document.onmousemove(){
if(event.srcElement.tagName=="A"){
var v=document.getElementById("div1")
v.style.visibility=''
v.innerHTML=event.srcElement.alt
v.style.pixelLeft=event.clientX+document.body.scrollLeft+1