Div布局案例

通常看到这个页面,会想到它是有几块组成的。
第一块,分销佣金。
第二块,包括代言、商品、二维码
其中代言又是左右结构。
于是乎基本的div结构就出来了。
<div class="row_1"> </div> <div class="row_2">
<div clas="row_2_1"> </div>
<div class="row_2_2"> </div>
<div class="row_2_3"> </div> </div> <div class="row_3"> </div>
然后逐层的添加与调整。
<div class="row_1">
<div class="left"><img class="money_img" src="{sh::PRES}public/img/t2.png"></span></div>
<div class="right">
<div class="money">分销佣金<font color='#CC0000'>{sh:$commission}</font>元</div>
<div class="sale">已销售<font color='#CC0000'><php>echo ($goodsData['salecount'] + $goodsData['fakemembercount']);</php></font>件</div>
</div>
</div> <div class="row_2">
<div clas="row_2_1">
<div class="left"><img src="{sh:$wxuserData.headimgurl}" width="70px" class="headimg"></div>
<div class="popover right">
<div class="arrow"></div>
<div class="popover-content">
<p>我是<font color='#FF9900'>{sh:$wxuserData.nickname}</font>,<br/><span>我为<font color='#FF9900'>{sh:$storeData.name}</font>代言。</span></p>
</div>
</div>
</div>
<div class="row_2_2">
<div class="item-img">
<img class="item-img-logo" src="{sh:$goodsData.logoimg}" width="100%">
<div class="item-bottom">
<span>{sh:$goodsData.name}</span>
<div>
<span class="price">¥<strong>{sh:$goodsData.price}</strong></span>
<small><s>¥{sh:$goodsData.oprice}</s></small>
</div>
</div>
</div>
</div>
<div class="row_2_3 qrcode">
<img src="{sh:$goodsData.qrcode}" width="100%">
<strong>长按二维码 识别图中二维码</strong>
</div> </div> <div class="row_3 tip">
<div class="title">
<i class="fa fa-sitemap"></i><span> 分销如何赚钱</span>
</div>
<div class="content">
<div>
<strong>第一步:</strong>转发商品链接或商品二维码图片给微信好友;<br/><br/>
<strong>第二步:</strong>从您转发的链接或图片进入商城的好友,系统将自动锁定成为您的客户,他们在微信商城中购买任何商品,您都可以获得分销佣金;<br/><br/>
<strong>第三步:</strong>您可以在分销中查看【我的团队】和【分销佣金】。好友确认收货后,佣金可提现。<br/><br/>
</div>
</div>
</div>
css最好写到style中
<style>
body{
background-color: #EFEFEF;
}
.item-bottom{
position: absolute;
left: 0px;
bottom: 0px;
background: rgba(0,0,0,0.4) none repeat scroll !important;
width: 100%;
color: #fff;
line-height: 25px;
padding-right: 5px;
text-align: left;
font-size: 13px;
padding-left: 10px;
}
.qrcode{text-align: center;}
.qrcode img{width:95%;}
.qrcode strong{color:#cc0033;text-align:center;padding:20px;display:block} .tip .title{height:30px;margin:10px;vertical-align:middle;line-height:30px;}
.tip .title img{padding: 5px;float:left;}
.tip .title div{width:100%;margin-left:5px;height:1px;background-color: #cc0033;} .tip .content{margin-left:15px;margin-right:15px;color:gray;}
.tip .content strong{color:black;}
.row_1{
width:100%;display: inline-flex;background-color: white;margin-bottom: 15px;
}
.row_2{
width:100%;position: relative;background-color: white;
}
.row_2_1{
display: inline-flex;margin-bottom: 10px;
}
.popover{
display: inline;left:80px;top:10px;width:70%;
}
.headimg{
margin: 10px 10px;
}
.item-img{
position: relative;
}
.price{
color:#CC3300; font-size: 16px;
}
.money{
display: inline-grid;font-size: 25px;padding:10px 5px 5px 5px;
}
.sale{
font-size: 18px;padding-left:10px;color:gray;
}
.money_img{
width: 80px;
padding: 5px;
}
.popover-content{
font-size: 14px;
}
</style>
如果很多的话,可以写到一个单独的css文件中,引入进来。
tips:
页面或者功能实现之后,这是第一步。 最好能够继续优化一下页面与代码。 将没用的去除,或者将代码进行优化调整。这是一个好习惯。 不管怎样,搞出来就是最牛逼的。优化是在搞出来基础上去做的事情。
Div布局案例的更多相关文章
- css+div布局案例
给最外层的div命名一个class 有针对性的进行css布局. <div class="joinus-info"> <div class="form-t ...
- HTML学习笔记 div布局及table布局案例 第三节 (原创)参考使用表
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- div 布局
转:http://blog.csdn.net/mercop/article/details/7882000 HTML CSS + DIV实现整体布局 1.技术目标: 开发符合W3C标准的Web页面 理 ...
- 慕课网5-2编程练习:flex布局制作卡片布局案例
慕课网5-2编程练习:flex布局制作卡片布局案例 小伙伴们,学习了卡片布局,接下来我们根据效果图,也写出一个卡片布局的页面吧! 效果图如下: 任务 1.主体内容的卡片一行只能显示两个. 2.卡片与卡 ...
- 小div布局之卡片堆叠(card-stacking)
前端的页面布局和各种效果真是让人眼花缭乱,公司的设计师恨不得在一个网站上把前端的布局和样式效果都用一遍. 如何实现下面这种布局效果?我给这种布局效果起了个名字,叫做小div布局之卡片堆叠.然后我百度了 ...
- [MVC] DIV 布局
[MVC] DIV 布局 <style> .top { background-color: red; height: 50px; top: 0px; position: absolute; ...
- 【html】【8】div布局[子div在父div居底]
从今天起 开始细话div布局 思路及要点: 父div的位置设置成相对的,即“position: relative;”. 而子div的位置设置成绝对的,并且下边缘设为0,即“position: ab ...
- Android(java)学习笔记164:Relativelayout相对布局案例
我们看看案例代码,自己心领神会: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout ...
- DIV布局之道三:DIV块的覆盖,DIV层遮盖其他DIV
DIV布局网页的第三种方式:覆盖.DIV覆盖方式经常应用于网页弹出框的制作,例如在网店系统中,当用户没有登录时,点击购买,系统弹出一个登陆框. 请看代码: HTML部分: XML/HTML Code复 ...
随机推荐
- php number_format()保留小数点后几位有效数的函数 千位分组来格式化数字(转)
PHP保留小数点后2位的函数number_format number_format(带小数点的书,小数点后保留的位数) number_format(8.3486,2); //取得小数点后2位有效数/ ...
- php 格式化金额
/** * 格式化金额 * * @param int $money * @param int $len * @param string $sign * @return string */ functi ...
- python之列表、字典的使用
一.概述:以后你在Linux里面写Python脚本的时候会经常用到Python列表.字典,因为你在以后写脚本的时候,大多数情况下都是对文件进行操作处理,使用字典和列表可以很好的操作文件,得出你想要的结 ...
- RESTful API实现
RESTful API实现 ASP.NET Core Web API 开发-RESTful API实现 REST 介绍: 符合REST设计风格的Web API称为RESTful API. 具象状态传输 ...
- Oracle EBS-SQL (BOM-19):主BOM与替代BOM互换.sql
替代BOM与主BOM互相转换 BOM: 1-01-27-211 子件:1-01-27-416 ID:2202 BOM替代项:替代0001 子件: 1-01-26-204 ID:2 ...
- html5 notifications通知
http://www.html5rocks.com/en/tutorials/notifications/quick/?redirect_from_locale=zh http://www.paulu ...
- read write spinlock
发一个自己基于 C++11 写的 read write spinlock,在 MinGW 4.8.2 (gcc 4.8 全面支持c++ 11,但由于gcc windows平台 libstdc++ 目前 ...
- 关于清晰讲解linux正则表达式的博文分享
http://www.cnblogs.com/chengmo/archive/2010/10/10/1847287.html linux shell 正则表达式(BREs,EREs,PREs)差异比 ...
- linux大事件集
1,RHEL 6.6 Beta为RHEL 6.x用户提供了对远程直接内存访问(RDMA)聚合以太网(RoCE)的支持(IB卡,Mellanox),带来低延迟.高带宽的网络连接; 2,rhel7 201 ...
- CSDN博文大赛火爆开启
俗话说的好,程序猿会写博,谁也挡不住! 是不是每一个开发人员都能写出好博文,这个非常难说,但能够肯定的是,能写出好博文的,一定是优秀的程序猿! 写作即思考,养成写博文的习惯,既能帮自己整理技术思路,也 ...