css样式引用的一个小问题

来源:百度知道 编辑:UC知道 时间:2024/05/15 16:55:58
我在dw这样写的
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style type="text/css">
<!--
xuxian {
border-top-style: none;
border-right-style: none;
border-bottom-style: dashed;
border-left-style: none;
border-bottom-color: #000000;
}
-->
</style>
</head>
下面我在一个表格引用xunxian的样式

<table class="xuxian" border="0" width="180" height="564" cellpadding="0" cellspacing="0">
<tr>
<td width="180" height="45" valign="top"><p align="left"> </p>
<p align="left">+数码MP3</p></td>
</tr>
<tr>
<td valign="top" height="45" width=

目前有两个错误,一个是楼上两位说的 . 问题
不过我认为这可能是你复制时候没复制上来

另一个就是你在css设置下边框的颜色和样式,
而有在table里设置了border="0",这样就冲突了,根据优先原则,就出现问题了
建议在css中加如
border-bottom-size: 1px;
并且删掉border="0"

xuxian {
border-top-style: none;
border-right-style: none;
border-bottom-style: dashed;
border-left-style: none;
border-bottom-color: #000000;
}

这里的代码引用错了。应该是

.xuxian {
border-top-style: none;
border-right-style: none;
border-bottom-style: dashed;
border-left-style: none;
border-bottom-color: #000000;
}

==========================
xunxian前面要加个点。
这是css里面的规定:class="xunxian" 想调用要这样:.xunxian !
如果是 id="xunxian" 想调用要这样: #xunxian !

id跟class的区别是 id是唯一的,一个网页文档里面只能有一个同样的id名字,但class可以有很多个。

xuxian {
border-top-style: none;
border-right-style: none;
border-bottom-style: dashed;
border-left-s