参考视频:【极客学院】一周学会Bootstrap
官方文档: Bootstrap 中文文档 · Bootstrap 是世界上最流行的、移动设备优先的、响应式前端开发框架。
功能需求
- 实现一个静态界面。
- 包含背景图片。(使用background-image样式属性)
- 包含头部导航栏,含搜索功能等。(使用bootstrap导航栏)
- 包含底部脚注,含文本。(使用bootstrap导航栏)
- 包含巨幕,包含文本和按钮。(使用bootstrap巨幕)
结果展示
源代码
文件目录
- 根目录
- index_test1.html 网页源代码
- index_test1_css.css 样式源代码
- 文件夹
- image/
s2.jpg 背景图片 - css/
bootstrap.css bootstrap样式
index_test1.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>MyWeb</title>
<!-- <script src="js/jquery-3.5.1.js"></script>
<script src="js/bootstrap.js"></script>-->
<link rel="stylesheet" type="text/css" href="css/bootstrap.css">
<link rel="stylesheet" type="text/css" href="index_test1_css.css">
</head>
<body>
<div class="mybackground"> <!--背景:使用固定图片-->
<header class="myheader"> <!--头部-->
<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container-fluid">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded=</