又一个漂亮的导航栏的下拉菜单
网上收集整合出来的,算是剽窃吧,IE6下用过,其他的没试。
SHARE
BODY {
MARGIN: 0px;
}
A.notes {
FONT-SIZE: 12px; COLOR: #ffffff; TEXT-DECORATION: none
}
.MS_link0 {
BORDER-RIGHT: #1e77d3 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: #1e77d3 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 12px; PADDING-BOTTOM: 0px; BORDER-LEFT: #1e77d3 1px solid; PADDING-TOP: 2px; BORDER-BOTTOM: #1e77d3 1px solid
}
.MS_link1 {
BORDER-RIGHT: #a1c6eb 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: #a1c6eb 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 12px; BACKGROUND: #3484d7; PADDING-BOTTOM: 0px; BORDER-LEFT: #a1c6eb 1px solid; PADDING-TOP: 2px; BORDER-BOTTOM: #a1c6eb 1px solid
}
.MS_linksep {
PADDING-RIGHT: 1px; PADDING-LEFT: 1px; PADDING-BOTTOM: 2px; FONT: 12px Verdana; COLOR: #a1c6eb; PADDING-TOP: 0px
}
TD#msviGlobalToolbar {
PADDING-BOTTOM: 2px; WIDTH: 200px; PADDING-TOP: 2px
}
#msviGlobalToolbar A {
FONT: 12px Verdana; COLOR: #ffffff; TEXT-DECORATION: none
}
.MSFlyoutPopup {
BORDER-RIGHT: #dddddd 1px solid; PADDING-RIGHT: 3px; BORDER-TOP: #dddddd 1px solid; PADDING-LEFT: 3px; Z-INDEX: 10; FILTER: progid:DXImageTransform.Microsoft.dropshadow(OffX=1,OffY=1,Color=#cccccc,Positive='true') alpha(opacity=90); PADDING-BOTTOM: 2px; BORDER-LEFT: #dddddd 1px solid; PADDING-TOP: 2px; BORDER-BOTTOM: #dddddd 1px solid; FONT-FAMILY: "宋体"; BACKGROUND-COLOR: #1e77d3; TEXT-ALIGN: left
}
.MSFlyoutPopupHr {
BACKGROUND: #d0e0f0; MARGIN: 0px 11px 21px; HEIGHT: 1px
}
.TFlyPopupAnimate {
BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 0px; BORDER-TOP: gray 1px solid; DISPLAY: block; PADDING-LEFT: 0px; Z-INDEX: 1; VISIBILITY: hidden; PADDING-BOTTOM: 0px; MARGIN: 0px; OVERFLOW: hidden; BORDER-LEFT: gray 1px solid; PADDING-TOP: 0px; BORDER-BOTTOM: gray 1px solid; POSITION: absolute
}
function TFly_Init(name, offsetLeft, offsetTop, alignment, anyIter, anyTime, staticHover, popupHover, popupLatency, hideLatency, onInit, onPopup, onHide) {
var TFly = document.getElementById(name);
TFly.DT = document.getElementById(name + "_Popup");
TFly.F = document.getElementById(name + "_Anim");
TFly.oX = offsetLeft;
TFly.oY = offsetTop;
TFly.alignment = alignment;
TFly.AnyIter = anyIter;
TFly.AnyTime = anyTime;
TFly.popupLatency = popupLatency;
TFly.hideLatency = hideLatency;
TFly.onPopup = onPopup;
TFly.onHide = onHide;
TFly.onmouseover = function() {
if (staticHover != '') {
TFly.className_ = TFly.className;
TFly.className = staticHover;
}
TFly_Popup(TFly, true);
}
TFly.onmouseout = function() {
if (staticHover != '') {
TFly.className = TFly.className_;
}
TFly_Popup(TFly, false);
}
if (document.all) {
TFly.onactivate = TFly.onmouseover;
TFly.ondeactivate = TFly.onmouseout;
}
else {
TFly.onfocus = TFly.onmouseover;
TFly.onblur = TFly.onmouseout;
}
TFly.DT.onmouseover = function() {
if (popupHover != '') {
TFly.DT.className_ = TFly.DT.className;
TFly.DT.className = popupHover;
}
TFly_Popup(TFly, true);
}
TFly.DT.onmouseout = function() {
if (popupHover != '') {
TFly.DT.className = TFly.DT.className_;
}
TFly_Popup(TFly, false);
}
TFly_CallClientFunction(onInit, TFly);
}
function TFly_CallClientFunction(name, TFly) {
if (name != null && name != "")
eval(name + "(TFly);");
}
function TFly_SetPosition(TFly, obj) {
obj.style.top = TFly.oY + TFly.offsetHeight + "px";
obj.style.left = TFly.oX + (TFly.offsetWidth - obj.offsetWidth ) * (1 + TFly.alignment) / 2 + "px";
}
function TFly_Popup(TFly, value) {
if (TFly.timer != null) window.clearTimeout(TFly.timer);
if (value) {
if (TFly.status == "on") return;
var timeout = (TFly.status == "active") ? 0 : TFly.popupLatency;
if (TFly.AnyIter > 0 && TFly.AnyTime > 0)
TFly.timer = window.setTimeout(function() {TFly_AnimateStart(TFly, true, TFly.F.curIter);}, timeout);
else
TFly.timer = window.setTimeout(function() {TFly_SetVisibility(TFly, true);}, timeout);
}
else {
if (TFly.status == "off") return;
var timeout = (TFly.status == "active") ? 0 : TFly.hideLatency;
if (TFly.AnyIter > 0 && TFly.AnyTime > 0)
TFly.timer = window.setTimeout(function() {TFly_AnimateStart(TFly, false, TFly.F.curIter);}, timeout);
else
TFly.timer = window.setTimeout(function() {TFly_SetVisibility(TFly, false);}, timeout);
}
}
function TFly_SetVisibility(TFly, value) {
if (value == true) {
TFly_SetPosition(TFly, TFly.DT);
TFly.DT.style.visibility = "visible";
TFly.style.zIndex = "999";
}
else {
TFly.DT.style.visibility = "hidden";
TFly.style.zIndex = "0";
TFly.DT.style.left = "-10000px";
}
}
function TFly_AnimateStart (TFly, inout, curIter) {
if (TFly.F.timer != null) window.clearTimeout(TFly.F.timer);
if (curIter == null) curIter=0;
if (TFly.status != "active") {
TFly.status = "active";
TFly.F.style.visibility = "visible";
TFly.DT.style.visibility = "hidden";
}
if (curIter TFly.AnyIter) {
TFly.F.curIter = (curIter
|
|
|
TFly_Init('MS_user', 0, 0, -1, 2, 60, 'MSFlyoutStaticHover_msdn', '', 100, 400, '', '', '');
TFly_Init('MS_shortcut', 0, 0, 1, 2, 60, 'MSFlyoutStaticHover_msdn', '', 100, 400, '', '', '');
[Ctrl+A 全选 注:如需引入外部Js需刷新才能执行]