当前位置: 代码迷 >> JavaScript >> white比gray黑?解决方法
  详细解决方案

white比gray黑?解决方法

热度:213   发布时间:2012-03-16 16:34:56.0
white比gray黑?
下边的代码如下,大家copy过去存为htm,img不管它

用ie或firefox打开

会发现asdfasdf上边的那条线比下边的那条线要白一些

可是我的代码是这么写的:

上边的那条线:

25行:
<TD   colspan= "3 "   align= "center "   style= "border-bottom-color:gray;border-bottom-width:1px ">

下边的那条线:

45行:

<TD   colspan= "3 "   height= "1px "   style= "border-top-color:white;border-top-width:1px ">

white居然比gray还黑?

这是啥问题?


<!DOCTYPE   HTML   PUBLIC   "-//W3C//DTD   HTML   4.0   Transitional//EN ">
<html>
<head>
<meta   http-equiv= "Content-Type "   content= "text/html;   charset=gb2312 ">
<style   type= "text/css ">
<!--
.text   {font-size:   12px;width:100%;height:19px;
background-color:white;background-Image:url(image/textbg.gif)}
body   {   text-align:   center;font-size:12px;background-image:url(image/graybg.gif);margin:0;}
td{border-width:0px}
-->
</style>
</head>
<body>
<TABLE   width= "869px "   style= "background-color:black "   border= "1 ">
<tr>
<TD   rowspan= "4 "   style= "border-right-color:gray;border-right-width:1px ">
<IMG   SRC= "image/logo.gif ">
</TD>
<td   colspan= "3 ">
&nbsp;
</td>
</tr>
<TR>
<TD   colspan= "3 "   align= "center "   style= "border-bottom-color:gray;border-bottom-width:1px ">
<IMG   SRC= "image/home.gif ">
<IMG   SRC= "image/sperate.gif ">
<IMG   SRC= "image/customer.gif ">
<IMG   SRC= "image/sperate.gif ">
<IMG   SRC= "image/service.gif ">
<IMG   SRC= "image/sperate.gif ">
<IMG   SRC= "image/tech.gif ">
<IMG   SRC= "image/sperate.gif ">
<IMG   SRC= "image/view.gif ">
<IMG   SRC= "image/sperate.gif ">
<IMG   SRC= "image/contact.gif ">
</TD>
</TR>
<TR>
<TD   width= "200px "   align= "right "> <IMG   SRC= "image/bgimage.GIF "> <IMG   SRC= "image/left.gif "> </td>
<td   width= "469px "> <div   class= "text "> asdfasdf </div> </td>
<TD   width= "200px "> <IMG   SRC= "image/right.gif "> <IMG   SRC= "image/bgimageright.gif "> </TD>
</TR>
<TR>
<TD   colspan= "3 "   height= "1px "   style= "border-top-color:white;border-top-width:1px ">
&nbsp;
</TD>
</TR>
<td   colspan= "4 ">
<IMG   SRC= "image/blank.gif ">
</td>
</TABLE>
<body>
</html>

------解决方案--------------------
设置下边框,不要设上边框的,设上边框会把上面的TR的下边框也带出来,并且还是黑色,所以两个混合了就比较黑了,也不知道浏览器为什么这么搞?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN ">
<html>
  相关解决方案