Bootstrap項目實戰(zhàn)之子欄目資訊內容
來源:易賢網 閱讀:900 次 日期:2016-07-06 15:32:04
溫馨提示:易賢網小編為您整理了“Bootstrap項目實戰(zhàn)之子欄目資訊內容”,方便廣大網友查閱!

Bootstrap項目實戰(zhàn)之資訊內容,本文主要學習制作一下子欄目資訊內容,感興趣的小伙伴們可以參考一下

本文我們制作一下子欄目資訊內容,供大家參考,具體內容如下

谷歌瀏覽器解析的順序調整,需要全部加載后執(zhí)行

$(window).load(function() {

  $('.text').eq(0).css('margin-top', ($('.auto').eq(0).height() - $('.text').eq(0).height()) / 2 + 'px');

}); 

注:對于 Firefox 瀏覽器,可以按 Ctrl+Shift+M,調整移動端尺寸。

子欄目標題

<div class="jumbotron">

  <div class="container">

    <hgroup>

      <h1>資訊</h1>

      <h4>企業(yè)內訓的最新動態(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;

}

資訊內容

<div id="information">

  <div class="container">

    <div class="row">

      <div class="col-md-8 info-left">

        <div class="container-fluid" style="padding:0;">

          <div class="row info-content">

            <div class="col-md-5 col-sm-5 col-xs-5">

              <img src="img/info1.jpg"

              class="img-responsive" alt="">

            </div>

            <div class="col-md-7 col-sm-7 col-xs-7">

              <h4>廣電總局發(fā)布 TVOS2.0 華為阿里參與研發(fā)</h4>

              <p class="hidden-xs">

                TVOS2.0 是在 TVOS1.0 與華為 MediaOS 及阿里巴巴 YunOS 融合的基礎上,打造的新一代智能電視操作系統(tǒng)。華為主要承擔開發(fā)工作,內置的電視購物商城由阿里方面負責。

              </p>

              <p>

                admin 15 / 10 / 11

              </p>

            </div>

          </div>

        </div>

      </div>

      <div class="col-md-4 info-right hidden-xs hidden-sm">

        <blockquote>

          <h2>熱門資訊</h2>

        </blockquote>

        <div class="container-fluid">

          <div class="row">

            <div class="col-md-5 col-sm-5 col-xs-5"

            style="margin:12px 0;padding:0;">

              <img src="img/info3.jpg"

              class="img-responsive" alt="">

            </div>

            <div class="col-md-7 col-sm-7 col-xs-7"

            style="padding-right:0">

              <h4>標題</h4>

              <p>

                admin 15 / 10 / 11

              </p>

            </div>

          </div>

        </div>

      </div>

    </div>

  </div>

資訊內容 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制作子欄目資訊內容的想關代碼,希望大家喜歡。

更多信息請查看網絡編程

2026國考·省考課程試聽報名

  • 報班類型
  • 姓名
  • 手機號
  • 驗證碼
關于我們 | 聯(lián)系我們 | 人才招聘 | 網站聲明 | 網站幫助 | 非正式的簡要咨詢 | 簡要咨詢須知 | 新媒體/短視頻平臺 | 手機站點 | 投訴建議
工業(yè)和信息化部備案號:滇ICP備2023014141號-1 云南省教育廳備案號:云教ICP備0901021 滇公網安備53010202001879號 人力資源服務許可證:(云)人服證字(2023)第0102001523號
聯(lián)系電話:0871-65099533/13759567129 獲取招聘考試信息及咨詢關注公眾號:hfpxwx
咨詢QQ:1093837350(9:00—18:00)版權所有:易賢網