本文章基于黑马程序员视频教程《JavaWeb从入门到精通》进行整理,并由个人对部分内容进行补充说明。本文章仅用于个人学习/交流使用。
自己做一个旅游网的首页。
<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">
<title>Bootstrap 101 Templatetitle>
<link href="bootstrap/css/bootstrap.min.css" rel="stylesheet">
<script src="bootstrap/js/jquery-3.4.1.min.js">script>
<script src="bootstrap/js/bootstrap.min.js">script>
<style>
.inner{
border: 1px solid red;
}
.paddtop{
padding-top: 10px;
}
.search-btn{
float: left;
border: 1px solid #ffc900;
width: 90px;
height: 35px;
background-color: #ffc900;
text-align: center;
line-height: 35px;
margin-top: 15px;
}
.search-input{
float: left;
border: 2px solid #ffc900;
width:400px;
height: 35px;
padding-left: 5px;
margin-top: 15px;
}
.jx{
border-bottom: 2px solid #ffc900;
padding: 5px;
}
.company{
height: 40px;
background-color: #ffc900;
text-align: center;
line-height: 40px;
font-size: 8px;
}
style>
head>
<body>
<header class="container-fluid">
<div class="row">
<img src="img/top_banner.jpg" class="img-responsive" width="100%">
div>
<div class="row">
<div class="col-md-3">
<img src="img/logo.jpg" class="img-responsive">
div>
<div class="col-md-6">
<input type="text" class="search-input" placeholder="请输入要查询的信息">
<a class="search-btn" href="#">搜索a>
div>
<div class="col-md-3">
<img src="img/hotel_tel.png" class="img-responsive">
div>
div>
<div class="row">
<nav class="navbar navbar-default">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
<span class="sr-only">Toggle navigationspan>
<span class="icon-bar">span>
<span class="icon-bar">span>
<span class="icon-bar">span>
button>
<a class="navbar-brand" href="#">主页a>
div>
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li class="active"><a href="#">Link <span class="sr-only">(current)span>a>li>
<li><a href="#">线路1a>li>
<li><a href="#">线路2a>li>
<li><a href="#">线路3a>li>
<li><a href="#">线路4a>li>
<li><a href="#">线路5a>li>
ul>
div>
div>
nav>
div>
<div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
<ol class="carousel-indicators">
<li data-target="#carousel-example-generic" data-slide-to="0" class="active">li>
<li data-target="#carousel-example-generic" data-slide-to="1">li>
<li data-target="#carousel-example-generic" data-slide-to="2">li>
ol>
<div class="carousel-inner" role="listbox">
<div class="item active">
<img src="img/banner_1.jpg" alt="#" width="100%">
div>
<div class="item">
<img src="img/banner_2.jpg" alt="#" width="100%">
div>
<div class="item">
<img src="img/banner_3.jpg" alt="#" width="100%">
div>
div>
<a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true">span>
<span class="sr-only">Previousspan>
a>
<a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true">span>
<span class="sr-only">Nextspan>
a>
div>
header>
<div class="container">
<div class="row jx">
<img src="img/icon_5.jpg">
<span>黑马精选span>
div>
<div class="row paddtop">
<div class="col-md-3">
<div class="thumbnail">
<img src="img/jiangxuan_1.jpg" alt="#">
<p>上海直飞三亚5天4晚自由行(春节预售+亲子/蜜月/休闲游首选+豪华酒店任选+接送机)p>
<font color="red">¥699font>
div>
div>
<div class="col-md-3">
<div class="thumbnail">
<img src="img/jiangxuan_2.jpg" alt="#">
<p>上海直飞三亚5天4晚自由行(春节预售+亲子/蜜月/休闲游首选+豪华酒店任选+接送机)p>
<font color="red">¥699font>
div>
div>
<div class="col-md-3">
<div class="thumbnail">
<img src="img/jiangxuan_3.jpg" alt="#">
<p>上海直飞三亚5天4晚自由行(春节预售+亲子/蜜月/休闲游首选+豪华酒店任选+接送机)p>
<font color="red">¥699font>
div>
div>
<div class="col-md-3">
<div class="thumbnail">
<img src="img/jiangxuan_4.jpg" alt="#">
<p>上海直飞三亚5天4晚自由行(春节预售+亲子/蜜月/休闲游首选+豪华酒店任选+接送机)p>
<font color="red">¥699font>
div>
div>
div>
div>
<div class="container">
<div class="row jx">
<img src="img/icon_6.jpg">
<span>国内游span>
div>
<div class="row paddtop">
<div class="col-md-4">
<img src="img/guonei_1.jpg">
div>
<div class="col-md-8">
<div class="row">
<div class="col-md-4">
<div class="thumbnail">
<img src="img/jiangxuan_4.jpg" alt="#">
<p>上海直飞三亚5天4晚自由行(春节预售+亲子/蜜月/休闲游首选+豪华酒店任选+接送机)p>
<font color="red">¥699font>
div>
div>
<div class="col-md-4">
<div class="thumbnail">
<img src="img/jiangxuan_3.jpg" alt="#">
<p>上海直飞三亚5天4晚自由行(春节预售+亲子/蜜月/休闲游首选+豪华酒店任选+接送机)p>
<font color="red">¥699font>
div>
div>
<div class="col-md-4">
<div class="thumbnail">
<img src="img/jiangxuan_2.jpg" alt="#">
<p>上海直飞三亚5天4晚自由行(春节预售+亲子/蜜月/休闲游首选+豪华酒店任选+接送机)p>
<font color="red">¥699font>
div>
div>
div>
<div class="row">
<div class="col-md-4">
<div class="thumbnail">
<img src="img/jiangxuan_1.jpg" alt="#">
<p>上海直飞三亚5天4晚自由行(春节预售+亲子/蜜月/休闲游首选+豪华酒店任选+接送机)p>
<font color="red">¥699font>
div>
div>
<div class="col-md-4">
<div class="thumbnail">
<img src="img/jiangxuan_2.jpg" alt="#">
<p>上海直飞三亚5天4晚自由行(春节预售+亲子/蜜月/休闲游首选+豪华酒店任选+接送机)p>
<font color="red">¥699font>
div>
div>
<div class="col-md-4">
<div class="thumbnail">
<img src="img/jiangxuan_4.jpg" alt="#">
<p>上海直飞三亚5天4晚自由行(春节预售+亲子/蜜月/休闲游首选+豪华酒店任选+接送机)p>
<font color="red">¥699font>
div>
div>
div>
div>
div>
div>
<footer class="container-fluid">
<div class="row">
<img src="img/footer_service.png" class="img-responsive" width="100%">
div>
<div class="row company">
江苏传智播客教育科技股份有限公司 版权所有Copyright 2006-2018, All Rights Reserved 苏ICP备16007882
div>
footer>
body>
html>
表头部分:
主体部分: