把base模板分为左右两块版心

一百二十五:CMS系统之首页轮播实现

.main-container{  /*整体版心*/
width: 990px;
margin: 0 auto;
overflow: hidden;
}
.lg-container{ /*左侧版心*/
width: 730px;
float: left;
}
.sm-container{ /*右侧版心*/
width: 250px;
float: right;
}

一百二十五:CMS系统之首页轮播实现

 

首页html

一百二十五:CMS系统之首页轮播实现

一百二十五:CMS系统之首页轮播实现

{% extends 'front/front_base.html' %}
{% from "common/_macros.html" import static %}

{% block title %}
首页
{% endblock %}


{% block head %}
<link rel="stylesheet" href="{{ static('front/css/front_index.css') }}">
{% endblock %}


{% block body %}
<div class="lg-container">

<!-- 轮播图 -->
<div >{% endblock %}

轮播图控制

一百二十五:CMS系统之首页轮播实现

.index-banner{  /* 圆角,超出的隐藏 */
border-radius: 10px;
overflow: hidden;
height: 200px; /*轮播图盒子高度*/
}
.index-banner img{ /* 轮播图盒子下的图片高度 */
height: 200px;
}

实现效果

一百二十五:CMS系统之首页轮播实现

 

相关文章:

  • 2021-06-08
  • 2021-10-01
  • 2021-09-15
  • 2022-12-23
  • 2021-08-31
  • 2021-05-20
  • 2021-09-23
  • 2021-11-05
猜你喜欢
  • 2021-05-18
  • 2021-07-10
  • 2021-05-15
  • 2021-06-18
  • 2021-09-29
  • 2021-11-25
  • 2021-07-25
相关资源
相似解决方案