【网页特效代码-页面特效】点击文字后展开一个非常漂亮的导航条,这个
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
¡¾ÍøÒ³ÌØЧ´úÂë-Ò³ÃæÌØЧ¡¿µã»÷ÎÄ×ÖºóÕ¹¿ªÒ»¸ö·Ç³£Æ¯ÁÁµÄµ¼º½Ìõ,Õâ¸ö.txt A.menuItem {
BORDER-RIGHT: #000000 0px solid; PADDING-RIGHT: 12px; BORDER-TOP: #000000 0px solid; DISPLAY: block; PADDING-LEFT: 8px; FONT-WEIGHT: bold; FONT-SIZE: 8pt; PADDING-BOTTOM:
2px; BORDER-LEFT: #000000 0px solid; CURSOR: default; COLOR: #ffffff; PADDING-TOP:
2px; BORDER-BOTTOM: #000000 0px solid; FONT-FAMILY: MS Sans Serif, Arial, Tahoma,sans-serif; TEXT-DECORATION: none
}
A.menuItem:hover {
COLOR: #ffff00; BACKGROUND-COLOR: #004060
}
</STYLE>
<DIV class=menu id=myMenu><A class=menuItem
href="">½¨Õ¾×ÊÔ´Íø</A>
<A class=menuItem
href="">ÐÂÀËÍø</A>
<A class=menuItem
href="">Íø Ò×</A>
<A class=menuItem
href="">½-ËÕÒô·û</A>
<A class=menuItem
href="">ÑëÊÓ¹ú¼Ê</A>
</DIV>
<P><font onclick="openMenu(event, 'myMenu');return false;">µã»÷´ò¿ª²Ëµ¥</font></P>
<SCRIPT type=text/javascript>
document.getElementById("myMenu").onmouseout = closeMenu;
function openMenu(event, id) {
var el, x, y;
el = document.getElementById(id);
if (window.event) {
x = window.event.clientX + document.documentElement.scrollLeft
+ document.body.scrollLeft;
y = window.event.clientY + document.documentElement.scrollTop +
+ document.body.scrollTop;
}
else {
x = event.clientX + window.scrollX;
y = event.clientY + window.scrollY;
}
x -= 2; y -= 2;
el.style.left = x + "px";
el.style.top = y + "px";
el.style.visibility = "visible";
}
function closeMenu(event) {
var current, related;
if (window.event) {
current = this;
related = window.event.toElement;
}
else {
current = event.currentTarget;
related = event.relatedTarget;
}
if (current != related && !contains(current, related))
current.style.visibility = "hidden";
}
function contains(a, b) {
// Return true if node a contains node b.
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}
</SCRIPT>
£Ñ291911320»¨×ÔÆ®ÁãË®×ÔÁ÷£¬Ò»ÖÖÏà˼£¬Á½´¦ÏгÐÄʺÆãÁ¬¹ãÓÓÚÎÞÉù´¦Ìý¾ªÀס£。