Text-Shadow在本地工作,但不在服务器上工作

时间:2014-03-27 19:29:05

标签: html css css3 internet-explorer iis

我的WinXP倒计时页面遇到了一些问题。 如果我打开存储在本地客户端上的网页,我的代码工作正常,即使我在IIS服务器上打开它显示正常,但在浏览它的URL时却没有。 虽然它在chrome中运行良好。 问题是文本阴影不起作用,如前所述,它在同一客户端上的同一浏览器上工作,而不是通过IIS浏览。 代码有点乱,但我的HTML技能不是你所谓的“专业”,有人可以帮我找到问题吗? :)

HTML:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="refresh" content="120">
<title> XP COUNTDOWN!!! </title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<div id="bg">
    <div id="Wrapper">
    <script type="text/javascript">

    dateFuture1 = new Date(2014,3,8,1,0,00);

    function GetCount(ddate,iid){

        dateNow = new Date();   
        amount = ddate.getTime() - dateNow.getTime();   
        delete dateNow;


        if(amount < 0){
            document.getElementById(iid).innerHTML="Now!";
        }

        else{
            days=0;hours=0;mins=0;secs=0;out="";

            amount = Math.floor(amount/1000);

            days=Math.floor(amount/86400);
            amount=amount%86400;

            hours=Math.floor(amount/3600);
            amount=amount%3600;

            mins=Math.floor(amount/60);
            amount=amount%60;

            secs=Math.floor(amount);

            if(days != 0){out += days +" "+((days==1)?"day":"days")+", ";}
            if(hours != 0){out += hours +" "+((hours==1)?"hour":"hours")+", ";}
            out += mins +" "+((mins==1)?"min":"mins")+", ";
            out += secs +" "+((secs==1)?"sec":"secs")+", ";
            out = out.substr(0,out.length-2);
            document.getElementById(iid).innerHTML=out;

            setTimeout(function(){GetCount(ddate,iid)}, 1000);
        }
    }

    window.onload=function(){
        GetCount(dateFuture1, 'countbox1');
    };
    </script>
    <div id="Shadow">
    <script type="text/javascript">

    var OSName="Unknown OS";
    var johan=navigator.appVersion
    if (navigator.appVersion.indexOf("Windows NT 6.3")!=-1) {
        OSName="Windows 8.1";
        var str = "Du kör " +OSName + " du kanske skulle nedgradera";
        var str = str.fontsize(70);
        var str = str.fontcolor("red");
        document.write(str)
    }
    if (navigator.appVersion.indexOf("Windows NT 5.1")!=-1) {
        OSName="Windows XP";
        var str = "Du kör " +OSName + " du borde uppgradera!!!";
        var str = str.fontsize(70);
        var str = str.fontcolor("red");
        document.write(str)
    }
    if (navigator.appVersion.indexOf("Windows NT 6.1")!=-1) {
        OSName="Windows 7";
        var str = "Du kör Windows 7, du behöver inte uppgradera"


    var str = str.fontsize(70)
            var str = str.fontcolor("green")
            document.write(str)
        }
    if (navigator.appVersion.indexOf("Linux")!=-1) OSName="Linux";
    // var str = "You are running" +OSName;
    // var str = str.fontsize(70);
    // var str = str.fontcolor("red");
    // document.write(str)

    </script><br>
    </div>
    <div id="countbox1" style="font:80pt Arial;color:#ffffff;text-shadow: 1px 1px 1px #120D0D;"></div>
    <div id="Shadow">
        <font size="50" face="Arial" color="white">Tills XP D&Ouml;R!!!</font> <br>
        <font face="Arial" size="50" color="white">XP LEFT in domain</font> <br>
        <img src="ripxp.png" alt="" height="395" width="377"><br>
        <font face="Arial" size="40" color="white">Countdown by Johan L</font> <br>
    </div>
    </div>
</div>
</body>
</html>

CSS(style.css):

/* CountdownXP */
#WhiteSpace
{
    margin-top:70;
}
#Wrapper
{
    height: 980px;
    text-align:center;
    padding-top:100px;
}
#bg
{
    background-image:url("wpxp.jpg");
    background-repeat:repeat-x;
    height: 1200;
}
#Header
{

}

#RipXP
{
    background-image:url("ripxp.JPG");
}

#Shadow
{
    font-color: white;
    font-family: Arial;
    text-shadow: 1px 1px 1px #120D0D;
}

0 个答案:

没有答案