4.16.侧边栏标题和广告位布局完成

templates/news/index.html

       <div class="sidebar-wrapper">
<div class="title-group">
<span class="title">在线课堂</span>
<a class="more" href="#">更多</a>
</div>
<div class="advertise-group">
<img src="https://static-image.xfz.cn/1554346383_8.png" alt="">
</div> </div>

src/css/index.scss

.main{
.wrapper{
.sidebar-wrapper {
float: right;
width: 356px;
height: 500px;
background: #fff; .title-group{
padding: 20px;
overflow: hidden;
.title{
float: left;
font-size: 18px;
color: #212121;
}
.more{
float: right;
font-size: 14px;
color: #5c87d9;
}
} .advertise-group{
img{
width: 100%;
}
}
}
}
}

效果

4.17.侧边栏-关注第三方平台盒子布局和样式

templates/news/index.html

        <div class="platform-group">
<div class="title-group">
<span class="title">关注小饭桌</span>
</div>
<div class="focus-group">
<ul class="left-group">
<li class="zhihu" ><a href="#" target="_blank" >小饭桌创业课堂</a></li>
<li class="weibo" ><a href="#" target="_blank" >小饭桌创业课堂</a></li>
<li class="toutiao" ><a href="#" target="_blank" >小饭桌</a></li>
</ul>
<div class="right-group">
<p class="desc">扫描关注小饭桌微信公众号</p>
</div>
</div> </div>

src/css/index.scss

      .focus-group{
padding: 0 20px;
overflow: hidden;
.left-group{
width: 180px;
float: left;
li{
width: 100%;
height: 50px;
line-height: 50px;
background: url("https://www.xfz.cn/static/build/images/side-icon.png") no-repeat;
background-size: 26%;
margin-bottom: 20px;
overflow: hidden;
a{
float: left;
margin-left: 64px;
color: #878787;
font-size: 14px;
}
}
.zhihu{
background-position: 0 0;
}
.weibo{
background-position: 0 -63px;
}
.toutiao{
background-position: 0 -122px;
}
} .right-group{
float: right;
width: 100px;
background: url("https://www.xfz.cn/static/build/images/xfz-school-wechat-share.png");
background-size: 100%;
background-repeat: no-repeat;
.desc{
margin-top: 100px;
color: #878787;
font-size: 12px;
}
}
}

效果

4.18.侧边栏-热门推荐完成

templates/news/index.html

          <div class="hot-news-group">
<div class="title-group">
<span class="title">热门推荐</span>
</div>
<ul class="hot-list-group">
<li>
<div class="left-group">
<p class="title" ><a href="#">印度人摩托车上的帝国</a></p>
<p class="more">
<span class="category">深度报道</span>
<span class="pub-time">1小时前</span>
</p>
</div>
<div class="right-group">
<a href="#">
<img src="https://static-image.xfz.cn/1561031505_57.jpg-website.news.list" alt="">
</a>
</div>
</li> <li>
<div class="left-group">
<p class="title" ><a href="#">早报:爱奇艺会员规模破1亿</a></p>
<p class="more">
<span class="category">爱奇艺</span>
<span class="pub-time">2小时前</span>
</p>
</div>
<div class="right-group">
<a href="#">
<img src="https://static-image.xfz.cn/1561246883_290.jpg-website.news.list" alt="">
</a>
</div>
</li>
</ul>
</div>

src/css/index.scss

        .hot-news-group{
.hot-list-group{
li{
padding: 0 20px 20px;
overflow: hidden;
border-bottom: 1px solid #eee; .left-group{
float: left;
width: 204px;
height: 72px;
position: relative;
.title{
font-size: 16px;
a{
color: #212121;
&:hover{
color: #5c87d9;
}
}
} .more{
position: absolute;
left:;
right:;
bottom:;
font-size: 12px;
.category{
color: #5c87d9;
float: left;
}
.pub-time{
float: right;
color: #878787;
}
}
} .right-group{
float: right;
width: 102px;
height: 72px;
img{
width: 100%;
height: 100%;
}
}
}
}
}

效果

Django打造大型企业官网(八)的更多相关文章

  1. 超细讲解Django打造大型企业官网

    本文为知了课堂黄勇老师讲的<超细讲解Django打造大型企业官网>的笔记. 第一章 Django预热 1.创建virtualenv虚拟环境 2.URL组成部分详解 3.Django介绍 4 ...

  2. Django打造大型企业官网

    第1章 Django预热 1-为什么需要虚拟环境 2-virtualenv创建虚拟环境 3-virtualenvwrapper使用 4-URL组成部分讲解 5-课程准备工作 6-Django介绍 第2 ...

  3. Django打造大型企业官网(二)

    三.项目环境搭建 3.1.创建项目环境和安装包 创建django项目 mkvirtualenv DjangoProject workon DjangoProject pip install -i ht ...

  4. Django打造大型企业官网(七)

    4.13.新闻列表tab栏布局完成 templates/news/index.html <div class="list-outer-group"> <ul cl ...

  5. Django打造大型企业官网(六)

    4.9.根据轮播图个数修改小圆点数量 src/js/index.js function Banner() { this.bannerWidth = 798; } Banner.prototype.in ...

  6. Django打造大型企业官网(五)

    4.6.切换轮播图的箭头样式以及显示和隐藏 templates/news/index.html <span class="arrow left-arrow">‹< ...

  7. Django打造大型企业官网(四)

    4.3.轮播图布局和样式 templates/news/index.html <div class="news-wrapper"> <div class=&quo ...

  8. Django打造大型企业官网(三)

    四.前端首页 4.1.导航条实现 (1)templates/new/index.html <!DOCTYPE html> <html lang="en"> ...

  9. Django打造大型企业官网(一)

    一.nvm的安装 (1)下载:nvm1.16 (2)安装完成后添加环境变量 C:\Users\Administrator\AppData\Roaming\nvm (3)修改settings.txt,将 ...

随机推荐

  1. freopen()重定向的打开和关闭

    freopen函数 功能 使用不同的文件或模式重新打开流,即重定向. 实现重定向,把预定义的标准流文件定向到由path指定的文件中.(直观感觉/实际操作都像是把文件定向到流,难道是说,对流来说就是重定 ...

  2. vue动态加载组件

    vue动态加载组件,可以使用以下方式 <component :is="propertyname" v-for="tab in tabs"></ ...

  3. luogu 4884 多少个1?

    题目描述: 给定整数K和质数m,求最小的正整数N,使得 11111⋯1(N个1)≡K(mod m) 说人话:就是 111...1111 mod m =K 题解: 将两边一起*9+1,左边就是10^an ...

  4. 笔试算法题(30):从已排序数组中确定数字出现的次数 & 最大公共子串和最大公共序列(LCS)

    出题:在已经排序的数组中,找出给定数字出现的次数: 分析: 解法1:由于数组已经排序,所以可以考虑使用二分查找确定给定数字A的第一个出现的位置m和最后一个出现的位置n,最后m-n+1就是A出现的次数: ...

  5. 数组排序函数-php数组函数(一)

    数组排序,共13个 函数中有u的,能自定义比较函数:有k的,按照键来排序:有r(reverse)的,倒序:有a(association)的,一定是键值关联,除了rsort() usort() sort ...

  6. 在linux服务器上搭建Struts2项目运行环境

    服务器上工作: 首先要先装java https://www.cnblogs.com/lamp01/p/8932740.html 然后装好tomcat https://www.cnblogs.com/y ...

  7. 图论算法——最短路径Dijkstra,Floyd,Bellman Ford

    算法名称 适用范围 算法过程 Dijkstra 无负权 从s开始,选择尚未完成的点中,distance最小的点,对其所有边进行松弛:直到所有结点都已完成 Bellman-Ford 可用有负权 依次对所 ...

  8. 九度oj 题目1068:球的半径和体积

    题目1068:球的半径和体积 时间限制:1 秒 内存限制:32 兆 特殊判题:否 提交:6148 解决:2269 题目描述: 输入球的中心点和球上某一点的坐标,计算球的半径和体积 输入: 球的中心点和 ...

  9. 1sting 大数 递推

    You will be given a string which only contains ‘1’; You can merge two adjacent ‘1’ to be ‘2’, or lea ...

  10. ZOJ 1298_Domino Effect

    题意: 多米诺骨牌效应:若干个关键牌相连,关键牌之间含有普通牌,关键牌倒下后其所在的行的普通牌全部倒下.求从推倒1号关键牌开始,最终倒下的牌的位置及时间. 分析: 最终倒下的牌的位置有两种情况,要么是 ...