Information content of H5 responsive development (3)
Consultation content
Let’s write the column rankings on the right next.
<div class="col-md-4 info-right"> <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="https://img.php.cn/upload/course/000/000/004/581b047e152ad666.jpg" class="img-responsive" alt=""> </div> <div class="col-md-7 col-sm-7 col-xs-7"> <h4>高通宣布470亿美元收购NXP 将帮其拓展汽车芯片市场</h4> <p >用户 16/11/2 浏览数:</p> </div> </div> <div class="row"> <div class="col-md-5 col-sm-5 col-xs-5" style="margin: 12px 0;padding: 0;"> <img src="https://img.php.cn/upload/course/000/000/004/581b049cad458310.jpg" class="img-responsive" alt=""> </div> <div class="col-md-7 col-sm-7 col-xs-7"> <h4>小米Note2全球首卖 小米双11促销全面开启</h4> <p >用户 16/11/2 浏览数:</p> </div> </div> <div class="row"> <div class="col-md-5 col-sm-5 col-xs-5" style="margin: 12px 0;padding: 0;"> <img src="https://img.php.cn/upload/course/000/000/004/581b04ae8a2f0453.jpg" class="img-responsive" alt=""> </div> <div class="col-md-7 col-sm-7 col-xs-7"> <h4>高告别单打独斗,美国网件Orbi多路由系统告诉你什么叫走到哪都有网</h4> <p >用户 16/11/2 浏览数:</p> </div> </div> </div> </div>
Adjust the container content.
<style> body { font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif; } #myCarousel{ margin: 50px 0 0 0; } .logo{ padding: 0; } .daohang{ margin-top: 0; } .carousel-inner img{ margin: 0 auto; } .jumbotron{ background-image: url(https://img.php.cn/upload/course/000/000/004/581af31542837558.jpg); margin: 50px 0 0; color: #ccc; } .jumbotron h1{ font-size: 26px; padding: 0 0 0 20px; } .jumbotron h4{ font-size: 15px; padding: 0 0 0 20px; } #information{ background-color: #EEEEEE; padding: 40px 0; } .info-cont{ background-color: #FFF; margin: 0 0 20px 0 ; box-shadow: 2px 2px 3px #ccc; } .info-cont img{ margin: 10px 0 10px 0; } .info-cont h4{ color: #000000; padding: 4px 0 ; font-size: 14px; } .info-cont p{ line-height: 1; color: #888888; } /*小屏幕 大于等于768px*/ @media (min-width: 768px) { .tab-h2{ font-size: 26px; } .tab-p{ font-size: 16px; } .text h3{ font-size: 22px; } .text p{ font-size: 16px; } .jumbotron h1{ font-size: 30px; } .jumbotron h4{ font-size: 16px; } .info-cont h4{ font-size: 16px; } } /*中等屏幕 大于等于992px*/ @media (min-width: 992px) { .tab-h2{ font-size: 28px; } .tab-p{ font-size: 17px; } .text h3{ font-size: 24px; } .text p{ font-size: 18px; } .jumbotron h1{ font-size: 32px; padding: 0 0 0 20px; } .jumbotron h4{ font-size: 17px; padding: 0 0 0 20px; } .info-cont h4{ font-size: 18px; } .info-cont p{ line-height: 1; color: #888888; } .info-right{ background-color: #fff; box-shadow: 2px 2px 3px #ccc; } .info-right blockquote{ margin: 0px; padding: 0px; } .info-right h2{ font-size: 20px; color: #333; padding: 5px; } .info-right h4{ color: #333; font-size: 16px; padding: 2px 0 0 0; } .info-right p{ line-height: 1.6; } /*小屏幕 大于等于768px*/ @media (min-width: 768px) { .tab-h2{ font-size: 26px; } .tab-p{ font-size: 16px; } .text h3{ font-size: 22px; } .text p{ font-size: 16px; } .jumbotron h1{ font-size: 30px; } .jumbotron h4{ font-size: 16px; } .info-cont h4{ font-size: 16px; } } /*中等屏幕 大于等于992px*/ @media (min-width: 992px) { .tab-h2{ font-size: 28px; } .tab-p{ font-size: 17px; } .text h3{ font-size: 24px; } .text p{ font-size: 18px; } .jumbotron h1{ font-size: 32px; padding: 0 0 0 20px; } .jumbotron h4{ font-size: 17px; padding: 0 0 0 20px; } .info-cont h4{ font-size: 18px; } } /*大屏幕 大于等于1200px*/ @media (min-width: 1200px) { .tab-h2{ font-size: 30px; } .tab-p{ font-size: 18px; } .text h3{ font-size: 26px; } .text p{ font-size: 19px; } .info-cont h4{ font-size: 20px; } } #footer{ color: white; background-color: #000000; padding: 20px; text-align: center; } } /*大屏幕 大于等于1200px*/ @media (min-width: 1200px) { .tab-h2{ font-size: 30px; } .tab-p{ font-size: 18px; } .text h3{ font-size: 26px; } .text p{ font-size: 19px; } .info-cont h4{ font-size: 20px; } } #footer{ color: white; background-color: #000000; padding: 20px; text-align: center; } </style>
In this way, the column on my right has been written, and the consultation webpage has been completed. The layout of the style needs to be adjusted slowly by yourself. If you are interested, you can re-layout the page and do Extract your favorite pages.
img-responsive: Responsive image.