HTML边框无法隐藏

时间:2017-03-23 10:13:39

标签: html css

我有一系列的桌子,我想隐藏边框,但我似乎无法让它们消失。

table {
  display: table;
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  border: 0px;
  outline: none;
}

th,
td {
  padding: 5px 10px;
  border: 0px;
  font-weight: 400;
  text-align: left;
  outline: none;
  border-collapse: collapse;
}
<table style="width: 100%">
  <tr>
    <th>Part 1 </th>
  </tr>
  <tr>
    <td style="width: 80%">
      <ul>
        <li style="text-align: left;">Summary</li>
        <li style="text-align: left;">Target</li>
        <li style="text-align: left;">Material</li>
      </ul>
    </td>
    <td>test</td>
  </tr>
</table>

我添加了浏览器中显示内容的屏幕截图。 enter image description here

2 个答案:

答案 0 :(得分:0)

这个答案似乎是Dreamweaver Preview In Browser功能中存在错误。当我使用此功能时,该表看起来就像我在原始帖子中提供的图像。当我直接在谷歌浏览器中打开页面时,边框确实是隐藏的。

答案 1 :(得分:-1)

尝试使用!important

就像这样:

border: 0px !important