tableborder(用table做网页,设置了border为1px怎么还是觉得很粗)
本文目录
- 用table做网页,设置了border为1px怎么还是觉得很粗
- table 里的border,cellpadding,cellspacing怎么定义
- CSS:现在table的border属性显示为obsolete(废弃的),那现在都用什么属性啊
- css问题 table border
- 请问在html中
是什么意思呢
用table做网页,设置了border为1px怎么还是觉得很粗
设置Table的细边框通常有这么几种方式:1、设置边框的BORDER=0 、cellspacing=1,设置Table的背景色为所要的边框色,再设置所有的td背景色为白色,这样细边框就显露出来了。这个方法有些邪气,看似不太正宗,但是也能达到效果,条条大路通罗马嘛!再来看看第二种方法:下面介绍一种更为简便有效的方法:3、设置table的CSS为{border-collapse:collapse;border:none;},再设置td的CSS为{border:solid #000 1px;},大功告成!而且Word也能认出这种设置。样式表如下:table#border{border-top:#000 1px solid;border-left:#000 1px solid; }table#border td{border-bottom:#000 1px solid;border-right:#000 1px solid; }然后再要加边框的html文件中加上
table 里的border,cellpadding,cellspacing怎么定义
《style》
.table{
border:1px
#000000
solid;
margin:10px
20px
30px
40px;
padding:30px
30px
30px
30px;
}
《/style》
其中
border
:1px边框
黑色
直线
margin
:边框外间距
依次是:上10px
右10px
下30px
左px
padding:
边框内间距
方法同上
哦也!!!!
小金币!!
==========================================
实验:
《table
class=“table“》《tr》《td》
测试
《/td》《/tr》《/table》
看效果CSS:现在table的border属性显示为obsolete(废弃的),那现在都用什么属性啊
你可以在table上设置left和top方向的border,再在td上设置right和bottom方向的border即可,示例如下:
《style type=“text/css“》
.table_style{ border-left:1px solid red; border-top:1px solid red;}
.table_style td{ border-right:1px solid red; border-bottom:1px solid red;}
《/style》
《table border=“0“ cellpadding=“0“ cellspacing=“0“ class=“table_style“》
《tr》
《td》1《/td》
《td》2《/td》
《/tr》
《/table》css问题 table border
你想为内部的table加边框? 还是要为内部table去边框呢? 如果要加边框就使用
《 table style=“border:1px solid #ccc“》
《/table》不加边框就使用
《 table style=“border:none“》
《/table》请问在html中