RWD 框架

创建于 2024-12-03 / 28
字体: [默认] [大] [更大]

现在有许多的 CSS 框架提供响应性设计。

它们是免费的,易于使用。


Bootstrap

当前流行的框架是 Bootstrap,它使用 HTML、CSS 和 jQuery 来创建响应式网页。

实例

<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://www.w3ccoo.com/lib/bootstrap/3.4.1/css/bootstrap.min.css">
<script src="https://cdn.staticfile.org/jquery/3.5.1/jquery.min.js"></script>
<script src="https://www.w3ccoo.com/lib/bootstrap/3.4.1/js/bootstrap.min.js"></script>
</head>
<body>

<div class="container">
  <div class="jumbotron">
    <h1>我的第一个 Bootstrap 页面</h1>
  </div>
  <div class="row">
    <div class="col-sm-4">
      ...
    </div>
    <div class="col-sm-4">
      ...
    </div>
    <div class="col-sm-4">
    ...
    </div>
  </div>
</div>

</body>
</html> 亲自试一试 »

要了解有关 Bootstrap 的更多信息,请转到我们的 Bootstrap 教程



0 人点赞过