首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > Web前端 >

多种alt属性的式样(鼠标经过显示)(悍)

2012-07-04 
多种alt属性的样式(鼠标经过显示)(悍)?IE默认会给带alt属性图片和带title的链接一个浮动显示:img srcht

多种alt属性的样式(鼠标经过显示)(悍)

?

IE默认会给带alt属性图片和带title的链接一个浮动显示:

<img src="http://www.okajax.com/images/logo.gif" alt="多种alt属性的式样(鼠标经过显示)(悍)"><a href="#" title="Ajax中国">Ajax中国</a>

增强效果1:

多种alt属性的式样(鼠标经过显示)(悍)?

增强效果2:

多种alt属性的式样(鼠标经过显示)(悍)?

??? '<table border="0" cellspacing="0" cellpadding="1" bgcolor="' + bg +?
??? '"><td align="center"><font face="sans-serif" color="' + fg +
??? '" style="font-size:12px">&nbsp\;' + msg +
??? '&nbsp\;</font></td></table></td></table>';
??? if(ns4)
??? {
????? toolTipSTYLE.document.write(content);
????? toolTipSTYLE.document.close();
????? toolTipSTYLE.visibility = "visible";
??? }
??? if(ns6)
??? {
????? document.getElementById("toolTipLayer").innerHTML = content;
????? toolTipSTYLE.display='block'
??? }
??? if(ie4)
??? {
????? document.all("toolTipLayer").innerHTML=content;
????? toolTipSTYLE.display='block'
??? }
? }
}
function moveToMouseLoc(e)
{
? if(ns4||ns6)
? {
??? x = e.pageX;
??? y = e.pageY;
? }
? else
? {
??? x = event.x + document.body.scrollLeft;
??? y = event.y + document.body.scrollTop;
? }
? toolTipSTYLE.left = x + offsetX;
? toolTipSTYLE.top = y + offsetY;
? return true;
}
</script>
<A href="#" onMouseOver="toolTip('四川辣椒的艺术 (转)', '#333333', '#BFFF95')" onMouseOut="toolTip()"><span style="color:#FF6600">四川辣椒的艺术 (转)</span></A>
<div id="toolTipLayer" style="position:absolute; visibility: hidden"></div>
<script language="JavaScript"><!--
initToolTips(); //--></script>

增强效果3:

多种alt属性的式样(鼠标经过显示)(悍)?

if ((e.x + locateObject(object).clientWidth) > (document.body.clientWidth + document.body.scrollLeft))
{?
locateObject(object).style.left = (document.body.clientWidth + document.body.scrollLeft) - locateObject(object).clientWidth-10;
}
else
{
locateObject(object).style.left=document.body.scrollLeft+event.clientX
}
locateObject(object).style.visibility="visible"
tipTimer=window.setTimeout("hideTooltip('"+object+"')", displaytime);
return true;
}
else if (document.layers)
{
locateObject(object).document.write('<table width="10" border="0" cellspacing="1" cellpadding="1"><tr bgcolor="'+bordercolor+'"><td><table width="10" border="0" cellspacing="0" cellpadding="2"><tr bgcolor="'+backcolor+'"><td nowrap><font style="font-family: Verdana,Tahoma, Arial, Helvetica, sans-serif; font-size: 11px; color: '+textcolor+'">'+unescape(tipContent)+'</font></td></tr></table></td></tr></table>')
locateObject(object).document.close()
locateObject(object).top=e.y+20
if ((e.x + locateObject(object).clip.width) > (window.pageXOffset + window.innerWidth))
{
locateObject(object).left = window.innerWidth - locateObject(object).clip.width-10;
}
else
{
locateObject(object).left=e.x;
}
locateObject(object).visibility="show"
tipTimer=window.setTimeout("hideTooltip('"+object+"')", displaytime);
return true;
}
else
{
return true;
}
}
</script>
? </head>
? <body>
<div id="dHTMLToolTip" style="position: absolute; visibility: hidden; width:10; height: 10; z-index: 1000; left: 0; top: 0"></div>
<span onMouseOver="showTooltip('dHTMLToolTip',event, '文字提示信息部分<br>带图片的<img src=http://www.okajax.com/images/logo.gif>', '#fffff2','#000000','#000000','20000')" onMouseOut="hideTooltip('dHTMLToolTip')">点这里</span>
</body>
<html>

增强效果4:

多种alt属性的式样(鼠标经过显示)(悍)?

?filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr='#0000FF', EndColorStr='#000000')">
<BR/><BR/><BR/>
<style type="text/css">
.link{font-family:verdana,arial,helvetica; font-size:8pt; color:#003399; font-weight:normal}
.link:hover{font-family:verdana,arial,helvetica; font-size:8pt; color:#0099FF; font-weight:normal}
.prem_hint{font-family:verdana,arial,helvetica; font-size:8pt; color:#ffffff; font-weight:normal}
.header{font-family:arial,verdana,helvetica; font-size:20pt; color:#ffff00; font-weight:bold}
</style>
<!--BEGIN REQUIRED-->
<script language="javascript">
// Location of this script:
// http://www.geocities.com/e_i_search/premshree/pub/scripts/JS/link_hint_scroller.htm
//*********************************************
//* Link Hint Scroller 1.0??????????????????? *
//* This script when you move your mouse over *
//* displays a scrolling hint???????????????? *
//* (c) Premshree Pillai,???????????????????? *
//* http://qik.cjb.net??????????????????????? *
//* E-mail : premshree@hotmail.com??????????? *
//* Use the script freely as long as this???? *
//* message is intact???????????????????????? *
//*********************************************
window.onerror = null;
?var bName = navigator.appName;
?var bVer = parseInt(navigator.appVersion);
?var NS4 = (bName == "Netscape" && bVer >= 4);
?var IE4 = (bName == "Microsoft Internet Explorer"?
?&& bVer >= 4);
?var NS3 = (bName == "Netscape" && bVer < 4);
?var IE3 = (bName == "Microsoft Internet Explorer"?
?&& bVer < 4);
?var scroll_length = 150; //The scroll length
?var time_length =50; //Scroll speed
?var begin_pos = 100; //Start position of scroll hint
?var i;
?var j;
?
if (NS4 || IE4) {
?if (navigator.appName == "Netscape") {
?layerStyleRef="layer.";
?layerRef="document.layers";
?styleSwitch="";
?}else{
?layerStyleRef="layer.style.";
?layerRef="document.all";
?styleSwitch=".style";
?}
}
//SCROLL
function Scroll(layerName){
if (NS4 || IE4) {
?if (NS4 || IE4) {?
?if(i<(begin_pos+scroll_length)){
?eval(layerRef+'["'+layerName+'"]'+
?styleSwitch+'.visibility="visible"');
?eval(layerRef+'["'+layerName+'"]'+
?styleSwitch+'.left="'+i+'"');
?i++;
?j++;
?if(i==j){
?setTimeout("Scroll('"+layerName+"')",time_length);}
?}
?}
?}
}
//STOP SCROLLING
function StopScroll(layerName)
{
i=begin_pos+scroll_length;
? eval(layerRef+'["'+layerName+'"]'+
? styleSwitch+'.left="'+i+'"');
? hideLayer(layerName);
}
function reset()
{?
i=begin_pos;
j=i;
}
// HIDE HINT
function hideLayer(layerName){
?if (NS4 || IE4) {
?eval(layerRef+'["'+layerName+'"]'+
?styleSwitch+'.visibility="hidden"');
?}
?}
</script>
<!--END REQUIRED-->
<center>
<span onmouseover="javascript:reset();Scroll('prem_hint');" onmouseout="javascript:StopScroll('prem_hint');">Move your mouse over</a>
</center>
<div id="prem_hint" style="position:relative; visibility:hidden" class="prem_hint">
This is the hint or description for the above link!
</div>
<!--END REQUIRED-->
</DIV>

转:http://www.okajax.com/a/200902/0213S542009.html

?

热点排行