Html 表格边框左侧和底部
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/14535856/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-29 05:15:10 来源:igfitidea点击:
Table border left and bottom
提问by Graig
I need to create border as per the below example.
我需要按照以下示例创建边框。
HTML:
HTML:
<table width="770">
<tr>
<td>picture (border only to the left and bottom ) </td>
<td>text</td>
</tr>
<tr>
<td>text</td>
<td>picture (border only to the left and bottom) </td>
</tr>
</table>
回答by masih arastooyi
you can use these styles:
您可以使用这些样式:
style="border-left: 1px solid #cdd0d4;"
style="border-bottom: 1px solid #cdd0d4;"
style="border-top: 1px solid #cdd0d4;"
style="border-right: 1px solid #cdd0d4;"
with this you want u must use
有了这个你想要你必须使用
<td style="border-left: 1px solid #cdd0d4;border-bottom: 1px solid #cdd0d4;">
or
或者
<img style="border-left: 1px solid #cdd0d4;border-bottom: 1px solid #cdd0d4;">
回答by Praveen Kumar Purushothaman
Give a class .border-lb
and give this CSS
给一个类.border-lb
并给这个 CSS
.border-lb {border: 1px solid #ccc; border-width: 0 0 1px 1px;}
And the HTML
和 HTML
<table width="770">
<tr>
<td class="border-lb">picture (border only to the left and bottom ) </td>
<td>text</td>
</tr>
<tr>
<td>text</td>
<td class="border-lb">picture (border only to the left and bottom) </td>
</tr>
</table>
Screenshot
截屏
Fiddle: http://jsfiddle.net/FXMVL/
小提琴:http: //jsfiddle.net/FXMVL/
回答by symlink
You need to use the border property as seen here: jsFiddle
您需要使用边框属性,如下所示:jsFiddle
HTML:
HTML:
<table width="770">
<tr>
<td class="border-left-bottom">picture (border only to the left and bottom ) </td>
<td>text</td>
</tr>
<tr>
<td>text</td>
<td class="border-left-bottom">picture (border only to the left and bottom) </td>
</tr>
</table>`
CSS:
CSS:
td.border-left-bottom{
border-left: solid 1px #000;
border-bottom: solid 1px #000;
}