1. 程式人生 > >移動web——bootstrap響應式工具

移動web——bootstrap響應式工具

針對 utf 圖片 back 列表 borde plugin doctype mage

基本介紹

1、利用媒體查詢功能並使用這些工具類可以方便的針對不同設備展示或隱藏頁面內容。

技術分享圖片

基本使用

<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!--
上述3個meta標簽*必須*放在最前面,任何其他內容都*必須*跟隨其後! --> <title>Bootstrap 101 Template</title> <!-- Bootstrap --> <link href="css/bootstrap.min.css" rel="stylesheet"> <style> .row div{ border: 1px solid #000; } </style> <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries
--> <!-- WARNING: Respond.js doesn‘t work if you view the page via file:// --> <!--[if lt IE 9]> <script src="https://cdn.bootcss.com/html5shiv/3.7.3/html5shiv.min.js"></script> <script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script> <![endif]
--> </head> <body> <div class="container-fluid"> <div class="row hidden-xs"> <div class="col-lg-3 col-sm-6">簡介</div> <div class="col-lg-3 col-sm-6">簡介</div> <div class="col-lg-3 col-sm-6">簡介</div> <div class="col-lg-3 col-sm-6">簡介</div> </div> </div> <!-- jQuery (necessary for Bootstrap‘s JavaScript plugins) --> <script src="js/jquery.min.js"></script> <!-- Include all compiled plugins (below), or include individual files as needed --> <script src="js/bootstrap.min.js"></script> </body> </html>

技術分享圖片

當屏幕小於768px就會隱藏列表

移動web——bootstrap響應式工具