第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問(wèn)題,去搜搜看,總會(huì)有你想問(wèn)的

表固定標(biāo)頭和可滾動(dòng)體

表固定標(biāo)頭和可滾動(dòng)體

九州編程 2019-07-11 15:23:17
表固定標(biāo)頭和可滾動(dòng)體我試圖使用引導(dǎo)3表創(chuàng)建一個(gè)具有固定標(biāo)題和可滾動(dòng)內(nèi)容的表。不幸的是,我找到的解決方案不適用于引導(dǎo),也不能破壞樣式。這里有一個(gè)簡(jiǎn)單的引導(dǎo)表,但由于某種原因,tbody的高度不是10 px。height: 10px !important; overflow: scroll;例子:<link rel="stylesheet" type="text/css" href="//netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css"><table class="table table-striped">    <thead>    <tr>        <th>Make</th>        <th>Model</th>        <th>Color</th>        <th>Year</th>    </tr>    </thead>    <tbody style="height: 10px !important; overflow: scroll; ">    <tr>        <td class="filterable-cell">111 Ford</td>        <td class="filterable-cell">Escort</td>        <td class="filterable-cell">Blue</td>        <td class="filterable-cell">2000</td>    </tr>    <tr>        <td class="filterable-cell">Ford</td>        <td class="filterable-cell">Escort</td>        <td class="filterable-cell">Blue</td>        <td class="filterable-cell">2000</td>    </tr>            <tr>        <td class="filterable-cell">Ford</td>        <td class="filterable-cell">Escort</td>        <td class="filterable-cell">Blue</td>        <td class="filterable-cell">2000</td>    </tr>     <tr>        <td class="filterable-cell">Ford</td>        <td class="filterable-cell">Escort</td>        <td class="filterable-cell">Blue</td>        <td class="filterable-cell">2000</td>    </tr>    </tbody>    </table>
查看完整描述

3 回答

?
隔江千里

TA貢獻(xiàn)1906條經(jīng)驗(yàn) 獲得超10個(gè)贊

您可能會(huì)在一個(gè)頁(yè)面上得到多個(gè)表,因此需要CSS類(lèi)。請(qǐng)找一個(gè)改進(jìn)的@Giulio解決方案。

只需在表中聲明:

<table class="table table-striped header-fixed"></table>

CSS

.header-fixed {
    width: 100% }.header-fixed > thead,.header-fixed > tbody,.header-fixed > thead > tr,.header-fixed > tbody > 
    tr,.header-fixed > thead > tr > th,.header-fixed > tbody > tr > td {
    display: block;}.header-fixed > tbody > tr:after,.header-fixed > thead > tr:after {
    content: ' ';
    display: block;
    visibility: hidden;
    clear: both;}.header-fixed > tbody {
    overflow-y: auto;
    height: 150px;}.header-fixed > tbody > tr > td,.header-fixed > thead > tr > th {
    width: 20%;
    float: left;}

請(qǐng)注意,當(dāng)前的實(shí)現(xiàn)只適合五列。如果需要不同的號(hào)碼,請(qǐng)更改寬度參數(shù)來(lái)自20%至*100%/數(shù)目_列*。


查看完整回答
反對(duì) 回復(fù) 2019-07-11
  • 3 回答
  • 0 關(guān)注
  • 401 瀏覽
慕課專(zhuān)欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢(xún)優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)