zoukankan      html  css  js  c++  java
  • 18-----BBS论坛

    BBS论坛(十八)

    18.首页轮播图实现

    (1)front/css/front_base.css

    .main-container{
        width: 990px;
        margin: 0 auto;
        overflow: hidden;
    }
    .lg-container{
        width: 730px;
        float:left;
    }
    .sm-container{
        width: 250px;
        float:right;
    }

    (2)front_base.html

    <link rel="stylesheet" href="{{ url_for('static',filename='front/css/front_base.css') }}">
    
    
    <div class="main-container">
        {% block body %}
    
        {% endblock %}
    </div>

    (3)front_index.html

    {% extends "front/front_base.html" %}
    
    {% block title %}
        仙剑论坛
    {% endblock %}
    
    {% block head %}
        <link rel="stylesheet" href="{{ static('front/css/front_index.css')  }}">
    {% endblock %}
    
    {% block body %}
        <div class="lg-container">
            <div id="carousel-example-generic" class="carousel slide index-banner" 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="https://static-image.xfz.cn/1512989310_955.jpg" alt="...">
                        <div class="carousel-caption">
                            ...
                        </div>
                    </div>
                    <div class="item">
                        <img src="https://static-image.xfz.cn/1528079965_535.jpeg" alt="...">
                        <div class="carousel-caption">
                            ...
                        </div>
                    </div>
                    ...
                </div>
    
                <!-- Controls -->
                <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">Previous</span>
                </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">Next</span>
                </a>
            </div>
        </div>
    
        <div class="sm-container">
    
        </div>
    
    {% endblock %}

    (4)front/css/front_index.css

    .index-banner{
        border-radius: 10px;
        overflow: hidden;
        height: 190px;
    }
    
    .index-banner img{
        height: 190px;
    }

  • 相关阅读:
    前端工程师如何打发闲余时光?(转)
    比较好的前端开发工具
    蓝桥历年套题 约数倍数选卡片 博弈
    单调栈求全1(或全0)子矩阵的个数 洛谷P5300与或和 P3400仓鼠窝
    5-15
    2018CCPC桂林站G Greatest Common Divisor
    STL中的BITSET运用
    2018CCPC桂林站JStone Game
    牛客2019湘潭大学程序竞赛
    Combine String HDU
  • 原文地址:https://www.cnblogs.com/edeny/p/10021057.html
Copyright © 2011-2022 走看看