1

我目前正在为我们的计费软件编写一个插件模块,当您使用任何元素时,这些模块会自动继承模板的 CSS。例如,我为我的表格使用“datatable”元素,它根据用户当前使用的模板继承 CSS 样式。

我想隐藏“数据表”元素具有的内边框,并且我正在使用标签将我的所有 CSS 放入模块代码中。我不太确定如何做到这一点,但这是计费软件模板 style.css 文件中 CSS 的样子。

table.form {
    border: 1px solid #B8CBE7;
    background-color: #fff;
    padding: 0px;
}
table.form td.fieldlabel {
    text-align: right;
    font-weight: bold;
    padding: 5px;
    background-color: #E4ECF8;
}
table.form td.fieldarea {
    text-align: left;
    padding: 5px;
    border-bottom: 1px dashed #ccc;
}
.tablebg {
    background-color: #e9e9e9;
}
table.datatable {
    padding: 0;
    margin: 0;
}
table.datatable th {
    background-color: #f3f3f3;
    font-weight: bold;
    text-align: center;
}
table.datatable td {
    background-color: #fff;
    text-align: center;
}
table.datatable tr.rowhighlight td {
    background-color: #EFF2F9;
}
table.datatable tr:hover td {
    background-color: #EFF2F9;
}
4

2 回答 2

2

您可以再次定义相同的数据表并将其边框设置为 0。您只需要确保这个新的 css 定义在实际定义之后

table.datatable { 
border: 0px;
}
于 2012-08-04T09:22:45.403 回答
1

尝试在 CSS 样式表中附加这一行:

.datatable{ border: 0 !important; }

于 2012-08-04T09:32:20.177 回答