bootstrap搭建页面案例

文件目录
这里写图片描述
index.html

<!DOCTYPE html>
<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">
    <!-- 上述3个meta标签*必须*放在最前面,任何其他内容都*必须*跟随其后! -->
    <title>Bootstrap 101 Template</title>

    <!-- Bootstrap -->
    <link href="./bootstrap.min.css" rel="stylesheet">
    <link href="app.css" rel="stylesheet" />
    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
      <script src="https://cdn.bootcss.com/html5shiv/3.7.3/html5shiv.min.js"></script>
      <script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>

<body>
    <div class="side-nav" role="navigation">
        <ul class="nav-side-nav">
            <li><a class="tooltip-side-nav" href="#onepage"></a></li>
            <li><a class="tooltip-side-nav" href="#twopage"></a></li>
            <li><a class="tooltip-side-nav" href="#threepage"></a></li>
            <li><a class="tooltip-side-nav" href="#fourpage"></a></li>
            <li><a class="tooltip-side-nav" href="#five"></a></li>
        </ul>
    </div>
    <div class="onepage" id="onepage">
        <div class="onepage-bg" id="onepagebg"></div>
        <div class="container">
            <div class="row">
                <div class="title-text">
                    <div class="col-md-12 headfontsize">
                        <h1 class="headh1content">
                            *****<br /> 在这里你可以学习
                            <br /> 到你想要的
                        </h1>
                        <p style="margin-top:50px;line-height:33px;">只要你有耐心,相信程序对你而言,小菜一碟,你一定是可以顺利拿下的</p>
                        <p class="btn-app-store">
                            <a class="btn btn-success btn-lg" href="#">立即注册,开始学习</a>
                        </p>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="twopage" id="twopage">
        <div class="twopage-text">
            <h1 class="twopage-text-h1">
                选择你的第一节课程进行学习<img src="images/Androidicon.png" />
            </h1>
        </div>
        <div class="row">
            <div class="twopage-courses col-md-4">
                <a href="#">
                    <img src="images/2d.jpg" style="width:100%" />
                    <div class="classicon">
                        <h3>认真学习哦</h3>
                        <h1><strong>学习这个课程</strong></h1>
                    </div>
                </a>
            </div>
            <div class="twopage-courses col-md-4">
                <a href="#">
                    <img src="images/screct.jpg" style="width:100%" />
                    <div class="classicon">
                        <h3>认真学习哦</h3>
                        <h1><strong>学习这个课程</strong></h1>
                    </div>
                </a>
            </div>
            <div class="twopage-courses col-md-4">
                <a href="#">
                    <img src="images/2048.jpg" style="width:100%" />
                    <div class="classicon">
                        <h3>认真学习哦</h3>
                        <h1><strong>学习这个课程</strong></h1>
                    </div>
                </a>
            </div>
        </div>
        <div class="twopagebtn">
            <a id="twopage-easy" href="#" class="btn btn-success btn-lg">如果你想学习,快快点击这里</a>
        </div>
    </div>
    <div class="threepage" id="threepage">
        <div class="threepage-bg" id="threepagebg">
            <div class="threepagecontent">
                <div class="threepagetext">
                    <h1>为什么要学习编程思想</h1>
                    <p>只要你有耐心,相信程序对你而言,小菜一碟!</p>
                </div>
                <a href="#" class="btn btn-success btn-lg threepagebtncontent">快速注册,要干活了</a>
            </div>
        </div>
    </div>
    <div class="fourpage" id="fourpage">
        <div class="container" style="width:70%">
            <div class="coursexingqing-text">
                <h1>要干活,必须要工具到位</h1>
                <p>怎么才能做到最快速的学习呢,你猜么?</p>
            </div>
            <div id="carousel-example-generic" class="carousel slide" data-interval="5000" style="height:300px">
                <ol class="carousel-indicators" style="margin-top:200px">
                    <li data-target="#carousel-example-generic" data-slide="0" class="active"></li>
                    <li data-target="#carousel-example-generic" data-slide="1" class=""></li>
                    <li data-target="#carousel-example-generic" data-slide="2" class=""></li>
                </ol>
                <div class="carousel-inner">
                    <div class="item active" style="width:500px">
                        <img src="images/four-2-1.png" />
                    </div>
                    <div class="item" style="width:500px">
                        <img src="images/four-2-1.png" />
                    </div>
                    <div class="item" style="width:500px">
                        <img src="images/four-2-1.png" />
                    </div>
                </div>
                <a class="left carousel-control" href="#carousel-example-generic" data-slide="prev">
                    <span class="glyphicon glyphicon-chevron-left"></span>
                </a>
                <a class="right carousel-control" href="#carousel-example-generic" data-slide="next">
                    <span class="glyphicon glyphicon-chevron-right"></span>
                </a>
            </div>
        </div>
    </div>
    <div class="fivepage" id="five">
        <div class="fivepage-bg" id="fivepage">
            <div class="container">
                <div class="footertext">
                    <h1>你还在等待呢。赶快动手吧</h1>
                </div>
                <div class="footerbtncenter">
                    <div class="row">
                        <a href="#">
                            <div class="col-md-4">
                                <img src="images/tuling.jpg" class="footerbtn queyeicon" />
                            </div>
                        </a>
                        <a href="#">
                            <div class="col-md-4">
                                <img src="images/tuling.jpg" class="footerbtn queyeicon" />
                            </div>
                        </a>
                        <a href="#">
                            <div class="col-md-4">
                                <img src="images/tuling.jpg" class="footerbtn queyeicon" />
                            </div>
                        </a>
                    </div>
                </div>
                <div class="footertextbtn">
                    <button type="button" class="btn btn-success btn-lg" style="font-size:25px;">你还在看?在看?再看我吃了你</button>
                </div>
                <p class="footertextbtn-text">
                    只要你有耐心,相信程序对你而言,就是小菜一碟!
                </p>
            </div>
        </div>
    </div>
    <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
    <script src="https://cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script>
    <!-- Include all compiled plugins (below), or include individual files as needed -->
    <script src="./bootstrap.min.js"></script>
</body>

</html>

app.css

h1,h3,p,a,button{
    font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
}

.side-nav{
    position: fixed;
    top: 45%;
    right: 20px;
    z-index: 1;
}

.side-nav ul.nav-side-nav{
    text-align: center;
    list-style: none;
    margin: 0;
    padding-left: 0;
}

.side-nav ul.nav-side-nav > li > a{
    display: block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #e2e2e2;
}

.side-nav ul.nav-side-nav > li{
    display: block;
    line-height: 1.45em;
    margin: 0;
    padding: 8px 0;
}

.onepage{
    height: 750px;
}

.onepage-bg{
    height: 800px;
    width: 100%;
    position: absolute;
    background-position: center center;
    background-size: cover;
}

#onepagebg{
    background-image:url("images/topicon.jpg");
}

.headh1content{
    margin-top: 150px;
    line-height: 75px;
}

.title-text{
    margin-left: 50px;
}

.headfontsize h1{
    font-size: 50pt;
    color: #fff;
}

.headfontsize p{
    color: #fff;
}

.twopage{
    padding: 2px 0 0 2px;
    height: auto;
    position: relative;
}

.twopage-text{
    width: 100%;
    text-align: center;
}

.twopage-text-h1{
    margin-left: 120px;
    letter-spacing: 2px;
    margin-top: 80px;
    margin-bottom: 0;
    padding: 20px 0 0 0;
}

.twopage-text-h1 img{
    width: 120px;
    margin-top: -20px;
}

.twopage .row{
    margin-right: 0;
    margin-left: 0;
}

.twopage-courses{
    float: left;
    background: #fff;
    padding: 0 2px 2px 0;
    position: relative;
    overflow: hidden;
}

.twopage-courses > a{
    width: 100%;
    height: 100%;
    float: left;
    text-align: center;
    position: relative;
}

.classicon h3{
    margin-top: 120px;
    color: #d1e973;
}

.classicon h1{
    color: #fff5e1;
}

.classicon{
    width: 100%;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
    color: #fff;
    opacity: 0;
}

.classicon:hover{
    background: #1eb450;
    opacity: 0.9;
    -webkit-transition:opacity 0.5s;
    transition: opacity 0.5s;
}

.twopagebtn{
    width: 100%;
    margin: 0 auto;
    text-align: center;
}

.twopagebtn .btn-lg{
    font-size: 25px;
}

#twopage-easy{
    margin: 50px 0;
    margin-bottom: 100px;
}

.threepage{
    position: absolute;
    width: 100%;
    height: 800px;
}
.threepage-bg{
    position: absolute;
    height: 100%;
    width: 100%;
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
}

#threepagebg{
    background-image:url("images/three.jpg");
}
.threepagecontent{
    width: 100%;
    margin: 0 auto;
    text-align: center;
}

.threepagetext{
    margin-top: 100px;
    color: #fff;
}

.threepagetext p{
    margin-top: 20px;
    font-size: 20px;
    line-height: 32px;
}

.threepagebtncontent{
    margin-top: 450px;
    font-size: 25px;
}

.fourpage{
    height: 700px;
    background: url("images/four.jpg");
     margin-top: 800px;
}

.coursexingqing-text{
    color: #fff;
    margin-top: 100px;
    width: 100%;
    text-align: center;
}

.coursexingqing-text p{
    margin-top: 25px;
    font-size: 20px;
}

.fourpage .container .carousel{
    margin-top: 30px;
}

.carousel-control.left {
    background-image: -webkit-linear-gradient(left,rgba(0,0,0,0) 0,rgba(0,0,0,0) 100%);
    background-image: -o-linear-gradient(left,rgba(0,0,0,0) 0,rgba(0,0,0,0) 100%);
    background-image: -webkit-gradient(linear,left top,right top,from(rgba(0,0,0,0)),to(rgba(0,0,0,0)));
    background-image: linear-gradient(to right,rgba(0,0,0,0) 0,rgba(0,0,0,0) 100%);
    background-repeat: repeat-x;
}

.carousel-control.right {
    right: 0;
    left: auto;
    background-image: -webkit-linear-gradient(left,rgba(0,0,0,0) 0,rgba(0,0,0,0) 100%);
    background-image: -o-linear-gradient(left,rgba(0,0,0,0) 0,rgba(0,0,0,0) 100%);
    background-image: -webkit-gradient(linear,left top,right top,from(rgba(0,0,0,0)),to(rgba(0,0,0,0)));
    background-image: linear-gradient(to right,rgba(0,0,0,0) 0,rgba(0,0,0,0) 100%);
    background-repeat: repeat-x;
}

.carousel-control .glyphicon-chevron-left, .carousel-control .icon-prev {
    left: -20%;
    /*margin-left: -10px;*/
}

.carousel-control .glyphicon-chevron-right, .carousel-control .icon-next {
    right: -20%;
    /*margin-right: -10px;*/
}

.fivepage-bg{
    height: 800px;
    width: 100%;
    position: absolute;
    background-position: center center;
    background-size: cover;
}

#fivepage{
    background-image:url("images/five.jpg");
}

.footertext{
    margin-top: 55px;
    width: 100%;
    color: #fff;
    font-size: 20px;
    text-align: center;
}

.footerbtncenter{
    margin-top: 100px;
    text-align: center;
}

.queyeicon{
    width: 200px;
}

.queyeicon:hover{
    border: 2px solid #d9edf7;
}

.footertextbtn{
    margin-top: 150px;
    width: 100%;
    text-align: center;
}

.footertextbtn-text{
    margin-top: 20px;
    color: #000;
    text-align: center;
}

这里写图片描述

  • 3
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值