valign屬性指定 <thead>元素中內(nèi)容的垂直對(duì)齊方式。HTML5 不支持 <thead> valign 屬性。請(qǐng)使用 CSS 代替。
將<thead>元素內(nèi)的內(nèi)容垂直對(duì)齊到底部:
<table style="width:100%;" border="1"> <thead valign="bottom"> <tr> <th height="50">Babi娃娃制造商</th> <th height="50">Babi娃娃類(lèi)型</th> </tr> </thead> <tr> <td>芭比公主</td> <td>6關(guān)節(jié)芭比娃娃</td> </tr> <tr> <td>芭比公主</td> <td>12關(guān)節(jié)芭比娃娃</td> </tr> </table>測(cè)試看看 ?/?
IEFirefoxOperaChromeSafari
所有主流瀏覽器都支持 valign 屬性。
HTML5 不支持 <thead> valign 屬性。請(qǐng)使用 CSS 代替。
valign 屬性指定 <thead> 元素中的內(nèi)容的垂直對(duì)齊方式。
<thead valign="top|middle|bottom|baseline">
值 | 描述 |
---|---|
top | 對(duì)內(nèi)容進(jìn)行上對(duì)齊。 |
middle | 對(duì)內(nèi)容進(jìn)行居中對(duì)齊(默認(rèn)值)。 |
bottom | 對(duì)內(nèi)容進(jìn)行下對(duì)齊。 |
baseline | 與基線對(duì)齊?;€是一條虛構(gòu)的線。在一行文本中,大多數(shù)字母以基線為基準(zhǔn)。baseline 值設(shè)置行中的所有表格數(shù)據(jù)都分享相同的基線。該值的效果常常與 bottom 值相同。不過(guò),如果文本的字號(hào)各不相同,那么 baseline 的效果會(huì)更好。請(qǐng)看下面的圖示。 |
當(dāng)文本的字號(hào)不同時(shí),bottom vs. baseline 圖示:
valign="bottom"
valign="baseline"