实例 Bootstrap 超小屏幕文本布局

x
 
<!DOCTYPE html>
<html>
<head>
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="https://apps.bdimg.com/libs/bootstrap/3.3.0/css/bootstrap.min.css">
  <script src="https://libs.baidu.com/jquery/2.1.4/jquery.min.js"></script>
  <script src="https://apps.bdimg.com/libs/bootstrap/3.3.0/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container">
  <h2>Example</h2>
  <p>Resize this page to see how the text below changes:</p>
  <h1 class="visible-xs bg-danger">This text is shown only on an EXTRA SMALL screen.</h1>
  <h1 class="visible-sm bg-info">This text is shown only on a SMALL screen.</h1>
  <h1 class="visible-md bg-warning">This text is shown only on a MEDIUM screen.</h1>
  <h1 class="visible-lg bg-success">This text is shown only on a LARGE screen.</h1>
  
  <p>Note: The visible-* classes are deprecated as of Bootstrap v3.2.0</p>
</div>
    
</body>
</html>
                    

输出结果