项目实战--首页内容介绍[下][4]

一.首页内容介绍[下]

#footer {

         background-color: #eee;

         border-top: 1px solid #ccc;

         padding: 20px;

         text-align: center;

}

 

<footer id="footer">

         <div class="container">

                   <p>企业培训 | 合作事宜 | 版权投诉</p>

                   <p>苏ICP 备12345678. © 2009-2016 瓢城企训网. Powered by Bootstrap.</p>

         </div>

</footer>

 

.tab2 {

         background-color: #eee;

         padding: 60px 20px;

         text-align: center;

}

.tab2 img {

         width: 40%;

         height: 40%;

}

 

 

.tab3 {

         padding: 60px 20px;

         text-align: center;

}

.tab3 img {

         width: 65%;

         height: 65%;

}

 

.text h3 {

         font-size: 20px;

}

.text p {

         font-size: 14px;

}

 

/*没有小于768px,是因为Bootstrap3以移动端优先设计*/

 

/* 小屏幕(平板,大于等于768px) */

@media (min-width: 768px) {

         .text h3 {

                   font-size: 22px;

         }

         .text p {

                   font-size: 15px;

         }

    //当进入小屏或小屏以上范围,文字在做,图片在右

         .tab2-text {

                   float: left;

         }

         .tab2-img {

                   float: right;

         }

}

 

/* 中等屏幕(桌面显示器,大于等于992px) */

@media (min-width: 992px) {

         .text h3 {

                   font-size: 24px;

         }

         .text p {

                   font-size: 16px;

         }

}

 

/* 大屏幕(大桌面显示器,大于等于1200px) */

@media (min-width: 1200px) {

         .text h3 {

                   font-size: 26px;

         }

         .text p {

                   font-size: 18px;

         }

}

 

<div class="tab2">

         <div class="container">

                   <div class="row">

                            <div class="col-md-6 col-sm-6 tab2-img">

                                     <img src="img/tab2.png" class="auto img-responsive center-block" alt="">

                                     //图片居中center-block

                            </div>

                            <div class="text col-md-6 col-sm-6 tab2-text">

                                     <h3>强大的学习体系</h3>

                                     <p>经过管理学大师层层把关、让您的企业突飞猛进。</p>

                            </div>

                   </div>

         </div>

</div>

 

<div class="tab3">

         <div class="container">

                   <div class="row">

                            <div class="col-md-6 col-sm-6">

                                     <img src="img/tab3.png" class="auto img-responsive center-block" alt="">

                            </div>

                            <div class="text col-md-6 col-sm-6">

                                     <h3>完美的管理方式</h3>

                                     <p>最新的管理培训方案,让您的企业赶超同行。</p>

                            </div>

                   </div>

         </div>

</div>

         //设置文字垂直居中,谷歌浏览器加载图片的顺序问题,导致高度无法获取

    //(图片的高度-文本的高度)/2

$(window).load(function () {

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

});

 $(window).resize(function () {

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

});

 

$(window).load(function () {

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

});

$(window).resize(function () {

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

});

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值