关于如何利用浮动实现复杂图文练习

复杂图文练习1


实现代码段如下

<!DOCTYPE html>
<html lang="en"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>work3</title><style>* {margin: 0;padding: 0;}.item {width: 852px;height: 152px;background-color: #fff;padding: 0 5px;border-bottom: 1px solid grey;}.item .wrap {width: 660px;height: 152px;float: left;}.wrap .title {height: 40px;line-height: 40px;font-size: 18px;margin-top: 20px;font-weight: 900;color: black;}.item .wrap .content {height: 44px;width: 660px;line-height: 22px;font-size: 16px;color: #a8a8a8;overflow: hidden;display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 2;}.item .bottom {height: 48px;font-size: 14px;color: #a8a8a8;}.item .bottom .itemm {float: left;margin-right: 22px;}.item .bottom .itemm img {height: 14px;margin-right: 8px;margin-top: 17px;float: left;}.item .bottom .itemm p {font-size: 14px;height: 48px;line-height: 48px;color: #a8a8a8;float: left;}.item .right {height: 100px;width: 152px;float: right;margin-top: 26px;border-radius: 4px;}</style>
</head><body><div class="item"><div class="wrap"><p class="title">你有没有想过,帮助孩子正确认识死亡!!</p><p class="content">死亡,一直是一个很严肃的话题,父母很少去和孩子谈死亡,怕让孩子心里有压力死亡,一直是一个很严肃的话题,父母很少去和孩子谈死亡,怕让孩子心里有压力死亡,一直是一个很严肃的话题,父母很少去和孩子谈死亡,怕让孩子心里有压力死亡,一直是一个很严肃的话题,父母很少去和孩子谈死亡,怕让孩子心里有压力</p><div class="bottom"><div class="itemm"><img src="./img/look.png" alt=""><p>1338</p></div><div class="itemm"><img src="./img/like.png" alt=""><p>1</p></div><div class="itemm"><img src="./img/pl.png" alt=""><p>0</p></div><div class="itemm"><img src="./img/circle.png" alt=""><p style="color: #ff819b;">情感交流</p></div></div></div><img src="./img/1.webp" alt="" class="right"></div><div class="item"><div class="wrap"><p class="title">小孩到底是放养好还是精养好?</p><p class="content">死亡,一直是一个很严肃的话题,父母很少去和孩子谈死亡,怕让孩子心里有压力死亡,一直是一个很严肃的话题,父母很少去和孩子谈死亡,怕让孩子心里有压力死亡,一直是一个很严肃的话题,父母很少去和孩子谈死亡,怕让孩子心里有压力死亡,一直是一个很严肃的话题,父母很少去和孩子谈死亡,怕让孩子心里有压力</p><div class="bottom"><div class="itemm"><img src="./img/look.png" alt=""><p>1338</p></div><div class="itemm"><img src="./img/like.png" alt=""><p>3</p></div><div class="itemm"><img src="./img/pl.png" alt=""><p>0</p></div><div class="itemm"><img src="./img/circle.png" alt=""><p style="color: #ff819b;">情感交流</p></div></div></div><img src="./img/2.webp" alt="" class="right"></div>
</body></html>

复杂图文练习2


实现代码段如下

<!DOCTYPE html>
<html lang="en">
<head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>work4</title><style>* {margin: 0;padding: 0;}.wrap {height: 410px;width: 220px;border: 1px solid lightgray;margin: 20px 10px 20px 10px;border-radius: 5px;float: left;}.wrap .big {height: 296px;width: 220px;border-top-left-radius: 5px;border-top-right-radius: 5px;}.wrap .title {height: 60px;line-height: 30px;margin-top: 10px;font-size: 16px;width: 176px;margin-left: 14px;color: black;font-weight: 500;}.bottom {height: 40px;width: 220px;color: gray;}.bottom .item1 {margin-left: 14px;height: 40px;float: left;}.bottom .item1 img {height: 30px;border-radius: 50%;margin-top: 5px;float: left;}.bottom .item1 p {height: 40px;line-height: 40px;font-size: 14px;margin-left: 8px;float: left;}.bottom .item2 {margin-right: 10px;height: 40px;float: right;}.bottom .item2 img {height: 16px;margin-top: 12px;float: left;}.bottom .item2 p {height: 40px;line-height: 40px;font-size: 14px;margin-left: 8px;float: left;}</style>
</head>
<body><div class="wrap"><img class="big" src="./img/1.jpg" alt=""><p class="title">干货分享<span>|</span>夏日其平衡车暴汗怎么穿</p><div class="bottom"><div class="item1"><img src="./img/6.jpg" alt=""><p>全能辣妈YuLi咯</p></div><div class="item2"><img src="./img/like.png" alt=""><p>96</p></div></div></div><div class="wrap"><img class="big" src="./img/2.jpg" alt=""><p class="title">Lifestyle<span>|</span>共赴灿烂夏日,一起去野餐吧!</p><div class="bottom"><div class="item1"><img src="./img/7.jpg" alt=""><p>YuKi旅行日记</p></div><div class="item2"><img src="./img/like.png" alt=""><p>136</p></div></div></div><div class="wrap"><img class="big" src="./img/3.jpg" alt=""><p class="title">移动办公利器<span>|</span>惠普战x鼠标真香!</p><div class="bottom"><div class="item1"><img src="./img/8.jpg" alt=""><p>Arron阿伊</p></div><div class="item2"><img src="./img/like.png" alt=""><p>96</p></div></div></div><div class="wrap"><img class="big" src="./img/4.jpg" alt=""><p class="title">一个懂父母的孩子才能教育出优秀的孩子</p><div class="bottom"><div class="item1"><img src="./img/9.jpg" alt=""><p>大汉堡小可乐</p></div><div class="item2"><img src="./img/like.png" alt=""><p>96</p></div></div></div><div class="wrap"><img class="big" src="./img/5.jpg" alt=""><p class="title">杭州看展<span>|</span>非物质文化遗产花丝工艺展</p><div class="bottom"><div class="item1"><img src="./img/10.jpg" alt=""><p>全能辣妈YuLi咯</p></div><div class="item2"><img src="./img/like.png" alt=""><p>96</p></div></div></div>
</body>
</html>

复杂图文练习3实现代码段如下

<!DOCTYPE html>
<html lang="en">
<head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>work5</title><style>* {margin: 0;padding: 0;}.wrap {height: 200px;width: 680px;margin-top: 20px;margin-left: 15px;}.wrap .title {height: 50px;line-height: 50px;font-style: 24px;color: black;font-weight: 700;letter-spacing: 3px;}.wrap .img {height: 118px;font-weight: 680px;}.wrap .img img {height: 118px;width: 158px;margin-left: 16px;float: left;border-radius: 3px;}.wrap .bottom {height: 32px;}.wrap .bottom {height: 32px;line-height: 32px;font-size: 14px;color: gray;}.wrap .bottom p {float: left;margin-right: 20px;}</style>
</head>
<body><div class="wrap" style="margin-top: 0;"><p class="title">油价调整消息。今天4月18日,全国油价调整后92,95号汽油价格</p><div class="img"><img style="margin-left: 0;" src="./img/1.jpg" alt=""><img src="./img/2.jpg" alt=""><img src="./img/3.jpg" alt=""><img src="./img/4.jpg" alt=""></div><div class="bottom"><p>每日财经整合</p><p>199评论</p><p>17小时前</p></div></div><div class="wrap"><p class="title">汪涵和杨乐乐,半路夫妻有笑也有泪,最担心的是儿子的成长</p><div class="img"><img style="margin-left: 0;" src="./img/5.jpg" alt=""><img src="./img/6.jpg" alt=""><img src="./img/7.jpg" alt=""><img src="./img/8.jpg" alt=""></div><div class="bottom"><p>娱人故事</p><p>199评论</p><p>02月25日</p></div></div>
</body>
</html>

复杂图文练习4


实现代码段如下

<!DOCTYPE html>
<html lang="en"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Document</title><style>* {margin: 0;padding: 0;}.wrap {height: 200px;width: 388px;border: 1px solid lightgray;float: left;margin: 8px;}.wrap .top {height: 18px;line-height: 18px;margin-top: 26px;width: 356px;margin-left: 16px;}.wrap .top .title {font-size: 18px;color: black;font-weight: 400;float: left;}.wrap .top .time {font-size: 16px;color: lightgray;margin-left: 12px;float: left;}.wrap .top .price {font-size: 18px;color: tomato;float: right;}.wrap .content {height: 16px;line-height: 16px;margin-top: 16px;margin-left: 16px;color: gray;}.wrap .tap {height: 64px;width: 356px;margin-left: 16px;border-bottom: 1px dotted gray;}.wrap .tap p {height: 28px;line-height: 28px;margin-top: 18px;font-size: 14px;color: gray;width: 62px;border: 1px solid lightgray;border-radius: 2px;margin-left: 12px;text-align: center;float: left;}.wrap .bottom {width: 356px;height: 58px;margin-left: 16px;}.wrap .bottom img {height: 42px;margin-top: 8px;float: left;border-radius: 2px;}.wrap .bottom .right {height: 42px;margin-top: 8px;margin-left: 15px;font-size: 16px;float: left;}.wrap .bottom .right .name {height: 21px;line-height: 21px;color: lightgreen;}.wrap .bottom .right .type {color: gray;}</style>
</head><body><div class="wrap"><div class="top"><p class="title">储备营业处...</p><p class="time">[1天前发布]</p><p class="price">25k-50k</p></div><p class="content">经验3-5年&nbsp;/&nbsp;本科</p><div class="tap"><p style="margin-left: 0;">科技金融</p><p>旅游&nbsp;|&nbsp;...</p><p>TO C</p></div><div class="bottom"><img src="./img/1.png" alt=""><div class="right"><p class="name">中美大都会</p><p class="type">金融业&nbsp;/&nbsp;上市公司&nbsp;/&nbsp;北京</p></div></div></div><div class="wrap"><div class="top"><p class="title">产品经理</p><p class="time">[1天前发布]</p><p class="price">11k-16k.13薪</p></div><p class="content">经验1-3年&nbsp;/&nbsp;大专</p><div class="tap"><p style="margin-left: 0;">软件服...</p><p>人工智...</p><p>广告产品</p></div><div class="bottom"><img src="./img/2.png" alt=""><div class="right"><p class="name">微媒</p><p class="type">社交媒体&nbsp;/&nbsp;未融资&nbsp;/&nbsp;杭州</p></div></div></div><div class="wrap"><div class="top"><p class="title">用户运营经理</p><p class="time">[1天前发布]</p><p class="price">14k-24k.16薪</p></div><p class="content">经验3-5年&nbsp;/&nbsp;本科</p><div class="tap"><p style="margin-left: 0;">科技金融</p><p>TO&nbsp;C</p><p>用户运营</p></div><div class="bottom"><img src="./img/3.png" alt=""><div class="right"><p class="name">度小满</p><p class="type">专业服务&nbsp;/&nbsp;咨询&nbsp;/&nbsp;A轮&nbsp;/&nbsp;北京</p></div></div></div>
</body></html>

关于利用浮动实现复杂图文练习相关推荐

  1. CSS:利用浮动实现多个盒子并排

    浮动 浮动: 浮动(float)是css样式的一个定位属性,可以使元素脱离正常文档流并浮动在它父容器的左侧或者右侧. float设置元素在水平浮动,意味着只能左右浮动而不能上下浮动. 注意事项: (1 ...

  2. 模拟机安装linux教程,Windows 10利用虚拟机安装Linux图文教程

    Linux由于其众多独特的优势(可参见Linux系统的优势),而被很多人所喜爱.而要使用Linux那首先要做的工作就是安装Linux系统了.这里给出在 win10 下利用虚拟机 Hyper-v 安装 ...

  3. 鲜果蓝产品在做营销时利用小红书发布图文笔记有哪些注意事项?

    笔记要有趣有质感:笔记是一种创意,它要有趣有质感,要有让人耳目一新的感觉,而不是仅仅把产品简单地介绍一遍就收工,要用文字的艺术把产品的特点表现出来,让读者看得赏心悦目,让读者更加热爱你的产品. 要用实 ...

  4. 利用浮动实现酷狗音乐主页布局2

    昨天写了基本的思路,今天用代码来看看实现的效果 页面的基本布局已经实现了: 接下来看看代码: 1.body结构: 2.CSS样式: 写到这里大的布局已经完成了.接下来我们就可以对左右盒子里面来布局.稍 ...

  5. 利用DW制作一个图文混排

    1 首先新建一个HTML5 2 用标签<img src=>插入一张图片 3 对图片设定好既定的参数,align=left haspce= width= 4 用H2突出标题 5 文字部分用& ...

  6. 《css+html小案例3》小米商城手机部分:利用浮动+弹性盒子布局

    一.代码 <!DOCTYPE html> <html lang="en"> <head><meta charset="UTF-8 ...

  7. 网页设计图片向上浮动_果冻公开课第六课:5分钟理解浮动布局

    浮动,是如何实现页面布局的呢? 它有哪些特质和使用方法? 今天,我们就用5分钟的动画短视频来深入浅出地理解浮动~ 动画视频: 果冻公开课:如何理解浮动布局? 文字解析: 网页儿也能这么图文并茂吗? 假 ...

  8. CSS3与页面布局学习总结(四)——页面布局大全BFC、定位、浮动、7种垂直居中方法...

    目录 一.BFC与IFC 1.1.BFC与IFC概要 1.2.如何产生BFC 1.3.BFC的作用与特点 二.定位 2.2.relative 2.3.absolute 2.4.fixed 2.5.z- ...

  9. CSS浮动(float)

    一 传统网页布局的三种方式 网页布局的本质:用 CSS 来摆放盒子,把盒子摆放到相应位置. CSS 提供了三种传统布局方式(简单说就是盒子如何进行排列). 普通流(标准流) 浮动 定位 这里指的只是传 ...

最新文章

  1. ubuntu18.04上安装TensorFlow2.0
  2. c语言将一个已知头结点的单链表逆序_C语言数据结构实现链表逆序并输出
  3. Webform(Linq高级查、分页、组合查询)
  4. 【c++】24.std::function和std::bind详解
  5. Git连载(9)使用Eclipse作为Git客户端
  6. 2020年推荐系统工程师炼丹手册
  7. 操作系统原理:连续的内存分配
  8. 使用ActiveMQ –具有故障转移协议的“主/从”配置
  9. macOS 10.15安装GDB
  10. 8. Mac brew usage and php version
  11. php jpeg不支持,php jpeg不支持怎么办
  12. 史上最全CSDN中免积分下载攻略
  13. c51语言的注释,单片机C51编程规范
  14. 自写用Easyclick快手全分辨率滑块验证源码!
  15. Linux笔记:Ubuntu18.04有线网络和无线网络的优先级设置
  16. uni-app 连接蓝牙打印机
  17. Fruit (hdu 2152)
  18. python RGB转HSV 阴影识别
  19. 非常好用且快速的Youtube下载命令行工具yt-dlp
  20. 尚学堂JAVA基础学习笔记_1/2

热门文章

  1. 市场上到底有多少款手机?(1)
  2. JAMA发表备受期待的22nd Century SPECTRUM(R)极低尼古丁含量香烟III期研究结果
  3. ubuntu16.04安装skype
  4. 基于谁也不信任的安全建设思路 打造安全防御体系
  5. 重温JAVASCRIPT ES6
  6. 悟透JavaScript(李站老师)-编程的快乐
  7. 自行搭建网站和APP统计平台
  8. QPS从0到4000请求每秒,谈达达后台架构演化之路
  9. Elasticsearch(5.x、6.x、7.x、8.x)的兼容性
  10. MSTP+VRRP综合实验