有没有办法像使用html一样用css设置表格的内边框或单元格边框?
我只能做到这一点,然后必须用html完成内边框或单元格边框。
html`
<table class="DrawRow2" table border="1">
<script type="text/javascript">
DR2 ("",Dummy1","Dummy2","Dummy3","Dummy4","Dummy5",1,-1,"Dummy6",1,0,0,"Dummy7");
[ResultItemsHTML]
</script>
</table>
css table.DR2{
border:5px;
border-style:outset;
border-color:#E80000; width:850px;
height:18px;
border-spacing:0;
border-collapes:collapse;
}
获取内边框的唯一方法是添加表格border =“1”有没有办法绘制单元格边框而不必在每个tr或td标签上进行?
答案 0 :(得分:2)
你可以使用css
simpply
table {
border: 1px solid black;
}
th {
border: 1px dotted green;
}
td {
border: 1px dashed red;
}
答案 1 :(得分:1)
td {
border:solid black 1px;
}