|
蓝森林 http://www.lslnet.com 2006年8月25日 8:28
[asp]谁来帮我看看这段代码?关于title的
这是一段改变title 的代码!可是我该怎么用css控制他显示的大小呢?请帮忙
[code]
<SCRIPT language=Javascript >
//******************************默认设置定义******************************
tPopWait=50; //停留tWait豪秒后显示提示
tPopShow=6000; //显示tShow豪秒后关闭提示
showPopStep=20;
popOpacity=85; //提示框的透明度,百分比
fontcolor="#000000";
bgcolor="#ededed";
bordercolor="#A5AAB5";
//******************************内部变量定义******************************
sPop=null;curShow=null;tFadeOut=null;tFadeIn=null;tFadeWaiting=null;
document.write("<style type='text/css'id='defaultPopStyle'>");
document.write(".cPopText { background-color: " + bgcolor + ";color:" + fontcolor + "; border: 1px " + bordercolor + " solid;font-color: font-size: 12px; padding-right: 3px; padding-left: 3px; height: 15px; padding-top: 2px; padding-bottom: 2px; filter: Alpha(Opacity=0)}");
document.write("</style>");
document.write("<div id='dypopLayer' style='position:absolute;z-index:1000;' class='cPopText'></div>");
function showPopupText()
{
var o=event.srcElement;MouseX=event.x;MouseY=event.y;
if(o.alt!=null && o.alt!=""){o.dypop=o.alt;o.alt=""};
if(o.title!=null && o.title!=""){o.dypop=o.title;o.title=""};
if(o.dypop!=sPop)
{
sPop=o.dypop;clearTimeout(curShow);clearTimeout(tFadeOut);clearTimeout(tFadeIn);clearTimeout(tFadeWaiting);
if(sPop==null || sPop=="")
{
dypopLayer.innerHTML="";dypopLayer.style.filter="Alpha()";dypopLayer.filters.Alpha.opacity=0;
}
else
{
if(o.dyclass!=null) popStyle=o.dyclass
else popStyle="cPopText";
curShow=setTimeout("showIt()",tPopWait);
}
}
}
function showIt()
{
dypopLayer.className=popStyle;dypopLayer.innerHTML=sPop;
popWidth=dypopLayer.clientWidth;popHeight=dypopLayer.clientHeight;
if(MouseX+12+popWidth>document.body.clientWidth) popLeftAdjust=-popWidth-24
else popLeftAdjust=0;
if(MouseY+12+popHeight>document.body.clientHeight) popTopAdjust=-popHeight-24
else popTopAdjust=0;
dypopLayer.style.left=MouseX+12+document.body.scrollLeft+popLeftAdjust;
dypopLayer.style.top=MouseY+12+document.body.scrollTop+popTopAdjust;
dypopLayer.style.filter="Alpha(Opacity=0)";fadeOut();
}
function fadeOut()
{
if(dypopLayer.filters.Alpha.opacity<popOpacity)
{ dypopLayer.filters.Alpha.opacity+=showPopStep;tFadeOut=setTimeout("fadeOut()",1); }
else
{ dypopLayer.filters.Alpha.opacity=popOpacity;tFadeWaiting=setTimeout("fadeIn()",tPopShow); }
}
function fadeIn()
{
if(dypopLayer.filters.Alpha.opacity>0)
{ dypopLayer.filters.Alpha.opacity-=1;tFadeIn=setTimeout("fadeIn()",1); }
}
document.onmouseover=showPopupText;
</SCRIPT>
<script>
function eshop(id) { window.open("Eshop.asp?cpbm="+id,"","height=400,width=640,left=200,top=0,resizable=yes,scrollbars=yes,status=no,toolbar=no,menubar=no,location=no");}
</script>
<script language="javascript">
<!--
function winopen(url)
{
window.open(url,"search","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=yes,width=640,height=450,top=200,left=100");
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
//-->
</script>
[/code] |
你是说用这段吗?!
document.write("<style type='text/css'id='defaultPopStyle'>");
|
fly3000在上个帖子中说
我看怎么不象呢 :rolleyes:
改变title好象一两句代码就可以了,你想怎样改变它呢?
另外,。。。你这个代码似乎太长了,除了改变title的还有很多其他处理的代码。 |
像www.roc3000.com那样的效果!
当我把鼠标放在链接上时会出现提示
。。。。。。。。。。。。。。。。。。。。。。。
我把这段代码用上我作的东东后,可以显示成他那种效果,可当我把IE的字体设为最大时它也变大了!?? |
那是在每个链接上都出现一种透明层提示:
[html]
<style>
body, textarea, table, tr, td, input
{ font-family:verdana, 宋体, Seoul, Gulim;
font-size: 9pt;
scrollbar-3dlight-color:616161;
scrollbar-arrow-color:888888;
scrollbar-base-color:CFCFCF;
scrollbar-face-color:CFCFCF;
scrollbar-highlight-color:ffffff;
scrollbar-shadow-color:595959;
scrollbar-darkshadow-color:FFFFFF;
letter-spacing:1px;
word-break:break-all;
}
A:link {
FONT-SIZE: 9pt; COLOR: #000000; TEXT-DECORATION: none
}
A:visited {
FONT-SIZE: 9pt; COLOR: #000000; TEXT-DECORATION: none
}
A:hover {
FONT-SIZE: 9pt; COLOR: #808080
}
TD {
FONT-SIZE: 12px; FONT-FAMILY: MS Shell Dlg;word-break:break-all;
}
.jun {
LINE-HEIGHT: 18px;
font-family: "宋体";
font-size: 12px;
}
.ff{
font-family: "宋体"; font-size: 12px; color: #FFFFFF;width:300px;FILTER: glow(color=#333333,strength=1)
}
.titlediv {
font-family: "Verdana", "Arial", "Helvetica", "sans-serif";
font-size: 12px;
font-weight: normal;
word-break:break-all;
filter: Alpha(Opacity=80, FinishOpacity=30, Style=1, StartX=1, StartY=1, FinishX=100, FinishY=100);
}
.divshow {
display: block;
position:absolute;
width:150px; z-index:1
}
.divhidden {
display: none;
position:absolute;
width:150px; z-index:1
}
</style>
<script>
function showdiv(div){
div.className='divshow';
div.style.left=event.x+document.body.scrollLeft-div.width-5;
div.style.top=event.y+document.body.scrollTop+20;
}
</script>
<center><img src="" border="0" style="cursor:hand" onmousemove="javascript:showdiv(div137);" onmouseout="javascript:div137.className='divhidden';"></center>
<div id="div137" class="divhidden" width="200">
<table width="200" border="1" cellpadding="5" cellspacing="0" bordercolor="#666666" bgcolor="#e9e9e9" class="titlediv" style="border-collapse:collapse">
<tr>
<td bgcolor="#f1f1f1">Nothing is impossible.<br>想一个人很寂寞。</td>
</tr>
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>废弃小屋</td>
<td><div align="right">一滩死水</div></td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<br><br><br>
<center><a href="http://www.yahoo.com" style="cursor:hand" onmousemove="javascript:showdiv(div137);" onmouseout="javascript:div137.className='divhidden';">偷天换日的手段</a></center>
[/html] |
|