Bootstrap項(xiàng)目實(shí)戰(zhàn)之子欄目資訊內(nèi)容

字號:


    Bootstrap項(xiàng)目實(shí)戰(zhàn)之資訊內(nèi)容,本文主要學(xué)習(xí)制作一下子欄目資訊內(nèi)容,感興趣的小伙伴們可以參考一下
    本文我們制作一下子欄目資訊內(nèi)容,供大家參考,具體內(nèi)容如下
    谷歌瀏覽器解析的順序調(diào)整,需要全部加載后執(zhí)行
    $(window).load(function() {
      $('.text').eq(0).css('margin-top', ($('.auto').eq(0).height() - $('.text').eq(0).height()) / 2 + 'px');
    }); 
    注:對于 Firefox 瀏覽器,可以按 Ctrl+Shift+M,調(diào)整移動端尺寸。
    子欄目標(biāo)題
    <div>
      <div>
        <hgroup>
          <h1>資訊</h1>
          <h4>企業(yè)內(nèi)訓(xùn)的最新動態(tài)、資源等...</h4>
        </hgroup>
      </div>
    </div>
    欄目 CSS
    .jumbotron {
      margin: 50px 0 0 0;
      padding: 60px 0;
      background: #ccc url(../img/bg.jpg);
      color: #ccc;
    }
    .jumbotron h1 {
      font-size: 26px;//768,30; 992,33; 1200,36;
      padding: 0 0 0 20px;
    }
    .jumbotron h4 {
      font-size: 16px;//768,16; 992,17; 1200,18
      padding: 0 0 0 20px;
    }
    資訊內(nèi)容
    <div id="information">
      <div>
        <div>
          <div>
            <div>
              <div>
                <div>
                  <img src="img/info1.jpg"
                 >
                </div>
                <div>
                  <h4>廣電總局發(fā)布 TVOS2.0 華為阿里參與研發(fā)</h4>
                  <p>
                    TVOS2.0 是在 TVOS1.0 與華為 MediaOS 及阿里巴巴 YunOS 融合的基礎(chǔ)上,打造的新一代智能電視操作系統(tǒng)。華為主要承擔(dān)開發(fā)工作,內(nèi)置的電視購物商城由阿里方面負(fù)責(zé)。
                  </p>
                  <p>
                    admin 15 / 10 / 11
                  </p>
                </div>
              </div>
            </div>
          </div>
          <div>
            <blockquote>
              <h2>熱門資訊</h2>
            </blockquote>
            <div>
              <div>
                <div
               >
                  <img src="img/info3.jpg"
                 >
                </div>
                <div
               >
                  <h4>標(biāo)題</h4>
                  <p>
                    admin 15 / 10 / 11
                  </p>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    資訊內(nèi)容 CSS
    #information {
      padding: 40px 0;
      background: #eee;
    }
    .info-right {
      background-color: #fff;
      box-shadow: 2px 2px 3px #ccc;
    }
    .info-right blockquote {
      padding: 0;
      margin: 0;
    }
    .info-right h2 {
      font-size: 20px;
      padding: 5px;
    }
    .info-right h4 {
      line-height: 1.6;
    }
    .info-content {
      background-color: #fff;
      box-shadow: 2px 2px 3px #ccc;
      margin: 0 0 20px 0;
    }
    .info-content img {
      margin: 12px 0;
    }
    .info-content h4 {
      font-size: 14px;//768,16; 992,18; 1200,20;
      padding: 2px 0 0 0;
    }
    .info-content p {
      line-height: 1.6;
      color: #666;
    }
    對于.info-content h4,在中屏和大屏需要保持一行。
    .info-content h4 {
      overflow: hidden;
      white-space: nowrap;
      text-overflow: ellipsis;
    }
    以上就是Bootstrap制作子欄目資訊內(nèi)容的想關(guān)代碼,希望大家喜歡。