內(nèi)嵌標(biāo)簽: thead (可選)、 tbody (可選)、td、tr、colgroup 、 caption (可選)
創(chuàng)新互聯(lián)堅(jiān)持“要么做到,要么別承諾”的工作理念,服務(wù)領(lǐng)域包括:網(wǎng)站設(shè)計(jì)制作、成都網(wǎng)站建設(shè)、企業(yè)官網(wǎng)、英文網(wǎng)站、手機(jī)端網(wǎng)站、網(wǎng)站推廣等服務(wù),滿足客戶于互聯(lián)網(wǎng)時(shí)代的江夏網(wǎng)站設(shè)計(jì)、移動(dòng)媒體設(shè)計(jì)的需求,幫助企業(yè)找到有效的互聯(lián)網(wǎng)解決方案。努力成為您成熟可靠的網(wǎng)絡(luò)建設(shè)合作伙伴!
屬性:align ,bgcolor ,bordercolor,border ,cellpadding ,cellspacing ,frame ,width ,summary ,rules 。
現(xiàn)在的table的屬性基本已經(jīng)過時(shí),都使用css進(jìn)行設(shè)置table樣式。
1.border-collapse collapse | separate
collapse : border線合并
separate: border線分隔,默認(rèn)屬性
ps: 使用collapse 此屬性時(shí), border-spacing 、empty-cells和 border-radius 失效 ,無任何效果。
2.border-spacing horizontal length | vertical length
3.vertical-align 設(shè)置內(nèi)容與圖片位置
4.table-layout auto | fixed
ps: auto 表格布局自適應(yīng)寬度
fixed 表格布局固定寬度,文字內(nèi)容等可能會(huì)溢出
5.caption-side 針對于caption標(biāo)簽的css樣式設(shè)置
6.empty-cells 但單元格內(nèi)無內(nèi)容時(shí)候,可設(shè)置隱藏
參考:
表格的邊框分為3個(gè)元素決定:table,th,td;
如果三種元素全部設(shè)置了border樣式,那么會(huì)發(fā)現(xiàn)外層有2層border,里面的th與th,td與td,td與th之間的border也是有2層的,所以,在設(shè)置border之前最好先想好通過什么樣的規(guī)則來展現(xiàn)boeder(因?yàn)榉绞胶芏啵敲次覀冎荒苓x擇適合自己的-也就是用的習(xí)慣的)。另外,表格之間還有一個(gè)概念是表空間,可以通過給表格設(shè)置樣式table{ border-collapse:collapse; border-spacing:0;}清除這些多余的空間,那么有了上面的準(zhǔn)備工作之后,下面就開始border樣式的設(shè)置--代碼如下:
td,th{border-bottom: 1px solid #e3e3e3;//xia下邊框border-right:1px solid #e3e3e3;//有邊框}
你是.hd-info 這個(gè)定義的長度是990還是table的width是990???如果是前者,說明你定義的其他樣式被沖掉了,需要自己查去;如果是后者的話,就是你的.he-info這個(gè)樣式有問題了,因?yàn)槟愕膚idth=1000
html
headtitleHTML
Table/title/head
style
type="text/css"
TABLE
{
border-collapse:
separate;
border:
2px
solid
blue;
}
.one{
border-left:none;
border-right:1px
solid
#f00;
border-top:1px
solid
#f00;
border-bottom:1px
solid
#f00;}
/style
body
table
summary="TechRepublic.com
-
Tables
and
CSS"
theadtr
thabbr="salesperson"
scope="col"Person/th
thabbr="sales"
scope="col"Sales/th
/tr/thead
tbodytr
td
class="one"Mr.
Smith/td
td600.00/td
/trtr
tdMr.
Jones/td
td0000.00/td
/trtr
tdMs.
Williams/td
td
class="one"0000.00/td
/tr/tbody
tfoottr
tdLet's
sale,
sale,
sale!/td
/tr/tfoot/table/body/html
我設(shè)置了一個(gè)樣式one,單元格左邊沒有邊框,上下和右邊有邊框,顏色你可以自己設(shè)置。
本文名稱:關(guān)于cssthead樣式的信息
分享路徑:http://jinyejixie.com/article46/dsdihhg.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供電子商務(wù)、微信公眾號(hào)、外貿(mào)建站、Google、面包屑導(dǎo)航、App設(shè)計(jì)
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)