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;
}
18.首页轮播图实现


最新文章

  1. form 表单跨域提交
  2. 搭建前端私有npm杂记
  3. 【python】调用机器喇叭发出蜂鸣声(Beep)
  4. Ubuntu之MaxScale安装配置
  5. AssetBundle系列——共享资源打包/依赖资源打包
  6. python gzip,bz2学习
  7. C++求斐波那契数
  8. 使AJAX调用尽可能利用缓存特性
  9. 无废话C#设计模式系列文章
  10. 关于STM32的ST官方的库的一点看法
  11. android 为组件添加contextMenu上下文菜单
  12. jQuery--Dom元素隐藏和显示原理(源码2.0.3)
  13. javax.ejb.SessionBean
  14. Python金融应用编程(数据分析、定价与量化投资)
  15. Git与远程reposiory的相关命令
  16. mysql性能优化之-innodb_flush_log_at_trx_commit
  17. Jmeter设置默认中文页面
  18. python day04 作业答案
  19. ES6 对象的扩展 Object.assign()
  20. OpenJudge 兔子与樱花

热门文章

  1. ROS Learning-014 learning_tf(编程) 坐标系变换(tf)广播员 (Python版)
  2. Jsp入门第二天
  3. 多线程学习-基础(五)sleep()和yield()的区别(理论)
  4. javascript 字典类型的使用
  5. Gazebo学习随记2 SDF和XML
  6. python---信用卡ATM
  7. Velodyne VPL16 configuration in ROS Kinetic
  8. go语言入门教程百度网盘 mysql图形化操作与数据导入
  9. 【谁知道C#字段为什么用属性封装?】
  10. phaser小游戏框架学习(二)