18-----BBS论坛
2024-09-03 01:41:04
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.首页轮播图实现
最新文章
- form 表单跨域提交
- 搭建前端私有npm杂记
- 【python】调用机器喇叭发出蜂鸣声(Beep)
- Ubuntu之MaxScale安装配置
- AssetBundle系列——共享资源打包/依赖资源打包
- python gzip,bz2学习
- C++求斐波那契数
- 使AJAX调用尽可能利用缓存特性
- 无废话C#设计模式系列文章
- 关于STM32的ST官方的库的一点看法
- android 为组件添加contextMenu上下文菜单
- jQuery--Dom元素隐藏和显示原理(源码2.0.3)
- javax.ejb.SessionBean
- Python金融应用编程(数据分析、定价与量化投资)
- Git与远程reposiory的相关命令
- mysql性能优化之-innodb_flush_log_at_trx_commit
- Jmeter设置默认中文页面
- python day04 作业答案
- ES6 对象的扩展 Object.assign()
- OpenJudge 兔子与樱花
热门文章
- ROS Learning-014 learning_tf(编程) 坐标系变换(tf)广播员 (Python版)
- Jsp入门第二天
- 多线程学习-基础(五)sleep()和yield()的区别(理论)
- javascript 字典类型的使用
- Gazebo学习随记2 SDF和XML
- python---信用卡ATM
- Velodyne VPL16 configuration in ROS Kinetic
- go语言入门教程百度网盘 mysql图形化操作与数据导入
- 【谁知道C#字段为什么用属性封装?】
- phaser小游戏框架学习(二)