我的UI部分始终显示边框。我怎么能隐藏它?
<div style="float:left; width:100%; height:40px; padding:25px 10px; text-align: left;">
<div style="padding-left: 260px;">
<table width="80%" border="0">
<tr>
<td width="35%">
<b>Equipment Type</b>
<span style="color:red"> *</span> @Html.DropDownListFor(model => model.ClassId, Model.ObjectClasses, "--Select--", new { id = "ddlObjectClass", @onchange = "ClassonChangefunc()", @style = "width:180px" })
</td>
<td width="5%"></td>
<td width="30%">
<b>Country</b>
<span style="color:red"> *</span> @Html.DropDownListFor(model => model.CountryId, Model.CountryList, new { data_val = "false", id = "ddlCountry", name = "ddlCountry", @onchange = "CountryChangefunc()", style = "width:200px;" })
</td>
</tr>
</table>
</div>
<div>
</div>
</div>
但边界线仍显示......
隐藏边框的简单方法是什么?
答案 0 :(得分:1)
为此特定表,其行和单元格添加此样式,即为此表设置ID(例如id="table
),然后为此表设置样式。
#table,
#table > tbody > tr,
#table > tbody > tr > td {
border: 0;
}
答案 1 :(得分:1)
您可以更改表格的边框样式
table, th, td, tr {
border-style: none; //!important -> if needed
}
看一下表格(html)&amp;边境(css)