对CSS 不是很了解,用的时候,也是想用什么了,再baidu ,凑合起来的。 检测的CSS错误 1.Error Line 1 column 0: character "/" not allowed in prolog. /* 全局 */ 2.Error Line 11 column 0: character "p" not allowed in prolog. p,td,ul,ol,li,dl,dt,dd {font-size:small;} 3.Error Line 19 column 0: character "#" not allowed in prolog. #news {MARGIN:5px;float:left;width:270px;height:500px;border:1px solid #579DDD;} 4.Error Line 25 column 0: character "a" not allowed in prolog. a{color:#666;font-size:12px;} 5.Error Line 28 column 21: end of document in prolog. a:hover:{color:#D05;}
body { margin:0; padding:0; font-family: "宋体",courier, verdana, arial, helveticasans-serif; background:url(../Images/bg.jpg) repeat-x #579DDD; } h1{ font-family:Lucida Grande,Arial,Helvetica,sans-serif; color:#036; font-size: 15px; text-align:center; border-bottom: 1px solid #E9F7FE; margin:0.3em 0; } div {MARGIN-RIGHT: auto;MARGIN-LEFT: auto;} /* top */ #top {width:980px;} #logo {float:left;width:180px;height:100px;} #logo img {vertical-align: bottom;} /* Main */ #main {width:980px;background-color:#FBFEFF;} #news {MARGIN:5px;float:left;width:270px;height:500px;background-color:#D9F1FF;border:1px solid #BBE6FF;} #info {float:left;width:695px;} #info ul{list-style:none;} /* banquan */ #di {width:980px;background-color:#FBFEFF;} #xianjie {width:960px;height:50px;background-color:#EEF8FF;border:1px solid #DDF0FF;} #banquan {width:960px;height:30px;text-align:center;} a{color:#666;font-size:12px;TEXT-DECORATION:none;} a:link{color:#333;} a:visited:{color:#666;} a:hover:{color:#D05;TEXT-DECORATION: underline;}
你可以在下面的地址校验: http://jigsaw.w3.org/css-validator/validator-text.html 你所示的 CSS,仅有两处错误: a:visited:{color:#666;} a:hover:{color:#D05;TEXT-DECORATION: underline;} 看红色部分,这里的“:”是多余的。