title顏色樣式

字號:


    顯示內(nèi)容的顏色樣式
    保存為html試試
    <html>
    <head>
    <script language=javascript>
    //***********默認(rèn)設(shè)置定義.*********************
    tpopwait=50;//停留twait豪秒后顯示提示。
    tpopshow=5000;//顯示tshow豪秒后關(guān)閉提示
    showpopstep=20;
    popopacity=99;
    //***************內(nèi)部變量定義*****************
    spop=null;
    curshow=null;
    tfadeout=null;
    tfadein=null;
    tfadewaiting=null;
    //background-color: #f8f8f5;顯示層的背景顏色
    //color:#ffffff;字體顏色
    //border: 1px #000000 solid;顯示層的邊框
    document.write(<style type='text/css'id='defaultpopstyle'>);
    document.write(.cpoptext { background-color: #888888;color:#000000; border: 1px #000000 solid;font-color: font-size: 12px; padding-right: 4px; padding-left: 4px; height: 20px; 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>
    <style>
    .cpoptext { font-size: 12px; background-color: #ffffff; padding-top: 2px; padding-right: 2px; padding-bottom: 2px; padding-left: 2px; border:1px solid #000000;}
    </style>
    </head>
    <body>
    <a href= title=第一層<br/>第二層<br/>第三層<br/>以后累加>網(wǎng)站制作學(xué)習(xí)網(wǎng)</a>
    </body>
    </html>
    關(guān)鍵詞:title顏色樣式,title顯示顏色樣式,title的顏色樣式設(shè)置,alt顏色樣式,alt顯示內(nèi)容的顏色樣式,title顯示內(nèi)容的顏色樣式