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;
    }

  • 相关阅读:
    eclipse配置自动提示EXTJS和jQurey
    Java用jdom.jar解析读取XML文件信息
    Hibernate配置XML连接数据库
    【codeforces】ZeptoLab Code Rush 2015 E 跳跃表? D kmp还不错的题
    各种语言版本的输出本身源代码的程序
    原地归并排序
    c/c++ static
    【程序员的自我修养——链接、装载与库】笔记
    【清华大学OS公开课】
    学习需要记录才行啊
  • 原文地址:https://www.cnblogs.com/edeny/p/10021057.html
Copyright © 2011-2022 走看看