* { padding: 0; margin: 0; }
li { }
body { background: #fdf7f7; }
#explain { height: 60px; border-bottom: 1px solid #999999; background: #eee; font-size: 14px; color: #666; text-align: center; line-height: 60px; }
#explain a { color: #990000; font-weight: bold; text-decoration: none; border-bottom: 1px dotted #990000; }
#explain a:hover { border-bottom: 2px solid #990000; }
#explain strong { color: #990000; }
ul { width: 716px; position: absolute; top: 260px; left: 50%; margin-left: -358px; }
li { width: 160px; height: 100px; list-style: none; background: #fff; padding: 3px; border-top: 1px solid #ddd; border-right: 2px solid #ddd; border-bottom: 2px solid #ddd; border-left: 1px solid #ddd; float: left; margin-right: 10px; cursor: pointer; }
img { float: left; }
#topic { width: 270px; background: #fff; padding: 3px; border-top: 1px solid #ddd; border-right: 2px solid #ddd; border-bottom: 2px solid #ddd; border-left: 1px solid #ddd; position: absolute; top: 100px; left: 200px; }
#topic .adorn { width: 7px; height: 11px; overflow: hidden; background: url(/upload/201011/20101103150729602.gif); position: absolute; bottom: 15px; left: -7px; }
#topic .adorn_r { width: 7px; height: 11px; overflow: hidden; background: url(/upload/201011/20101103150729137.gif); position: absolute; bottom: 15px; right: -7px; }
#topic .inner_html { padding: 10px; line-height: 20px; font-size: 12px; color: #666; text-indent: 24px; font-family: arial; }
#topic .inner_html a { color: #990000; font-weight: bold; text-decoration: none; border-bottom: 1px dotted #990000; }
#topic .inner_html a:hover { border-bottom: 2px solid #990000; }
var g_aData=
[
'ok12.net---好用的鼠标提示符好用的鼠标提示符好用的鼠标提示符---1111',
'ok12.net---好用的鼠标提示符好用的鼠标提示符好用的鼠标提示符---2222',
'ok12.net---好用的鼠标提示符好用的鼠标提示符好用的鼠标提示符---3333'
];
var g_oTimerHide=null;
window.οnlοad=function ()
{
var aLi=document.getElementById('content').getElementsByTagName('li');
bindTopic(aLi);
};
function bindTopic(aElement)
{
var i=0;
for(i=0;i
{
aElement[i].miaovIndex=i;
aElement[i].οnmοuseοver=function (ev){showTopic(this.miaovIndex, window.event || ev);};
aElement[i].οnmοuseοut=function (){hideTopic();};
aElement[i].οnmοusemοve=function (ev)
{
var oEvent=window.event || ev;
setPosition(oEvent.clientX, oEvent.clientY);
};
}
}
function showTopic(index, oEvent)
{
var oTopic=document.getElementById('topic');
if(g_oTimerHide)
{
clearTimeout(g_oTimerHide);
}
oTopic.getElementsByTagName('div')[1].innerHTML=g_aData[index];
oTopic.style.display='block';
setPosition(oEvent.clientX, oEvent.clientY);
}
function hideTopic()
{
var oTopic=document.getElementById('topic');
if(g_oTimerHide)
{
clearTimeout(g_oTimerHide);
}
g_oTimerHide=setTimeout
(
function ()
{
oTopic.style.display='none';
},50
);
}
function setPosition(x, y)
{
var top=document.body.scrollTop || document.documentElement.scrollTop;
var left=document.body.scrollLeft || document.documentElement.scrollLeft;
x+=left;
y+=top;
var oTopic=document.getElementById('topic');
var l=x+20;
var t=y-(oTopic.offsetHeight-20);
var bRight=true;
var iPageRight=left+document.documentElement.clientWidth;
if(l+oTopic.offsetWidth>iPageRight)
{
bRight=false;
l=x-(oTopic.offsetWidth+20);
oTopic.getElementsByTagName('div')[0].className='adorn_r';
}
else
{
oTopic.getElementsByTagName('div')[0].className='adorn';
}
oTopic.style.left=l+'px';
oTopic.style.top=t+'px';
}
- 这是文字1111的, 也可以是图片
- 这是文字2222的, 也可以是图片
- 这是文字3333的, 也可以是图片
分享到:更多