一个值得HTML初学者收藏的响应式前端开发框架是Bootstrap。Bootstrap是Twitter开发的一个用于前端开发的开源工具包,它是一个CSS和HTML的集合,用于开发响应式布局、移动设备优先的网站。
以下是一个简单的Bootstrap网格系统示例,它展示了如何使用Bootstrap创建一个三列的布局:
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Bootstrap Grid Example</title>
  <!-- 引入Bootstrap CSS -->
  <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
</head>
<body>
  <div class="container">
    <div class="row">
      <div class="col-md-4">
        <h4>Column 1</h4>
        <p>This is some text</p>
      </div>
      <div class="col-md-4">
        <h4>Column 2</h4>
        <p>This is some text</p>
      </div>
      <div class="col-md-4">
        <h4>Column 3</h4>
        <p>This is some text</p>
      </div>
    </div>
  </div>
  
  <!-- 引入Bootstrap JS -->
  <script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.9.2/dist/umd/popper.min.js"></script>
  <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
</body>
</html>这个例子中,.container 类用于创建一个响应式的容器,.row 类用于创建行,而 .col-md-4 类则用于创建三列宽度均匀分布的布局,适合中等屏幕设备(如桌面显示器)。当屏幕尺寸变小时,列会自动变为水平排列。这是Bootstrap响应式网格系统的基本用法。