当前位置: 首页 > news >正文 上海网站建设中心wordpress 转域名 news 2025/10/28 14:07:18 上海网站建设中心,wordpress 转域名,什么网站做3d模型能赚钱,ui设计实训报告#x1f31f;所属专栏#xff1a;前端只因变凤凰之路#x1f414;作者简介#xff1a;rchjr——五带信管菜只因一枚#x1f62e;前言#xff1a;该系列将持续更新前端的相关学习笔记#xff0c;欢迎和我一样的小白订阅#xff0c;一起学习共同进步~#x1f449;文章简…所属专栏前端只因变凤凰之路作者简介rchjr——五带信管菜只因一枚前言该系列将持续更新前端的相关学习笔记欢迎和我一样的小白订阅一起学习共同进步~文章简介本文介绍CSS的浮动相关知识。知识学习内容来自b站的黑马程序员的视频1 浮动的两个注意第一条. 浮动和标准流的父盒子搭配先用标准流的父元素排列上下位置之后内部子元素采取浮动排列左右位置第二条. 一个元素浮动了理论上其余的兄弟元素也要浮动一个盒子里面有多个子盒子如果其中一个盒子浮动了那么其他兄弟也应该浮动防止引起问题。并且浮动的盒子只会影响浮动盒子后面的标准流不会影响前面的标准流2 为什么清除浮动原因有些情况父盒子是没有高度的或者不知道父盒子内部具体有多少内容。这时就需要让孩子盒子撑开父盒子两者高度一致。可是我们之前又说要浮动才能让子孩子在一行显示而浮动是不占据位置的所以这样又会导致父盒子高度为0见下图!DOCTYPE html html langenheadmeta charsetUTF-8meta http-equivX-UA-Compatible contentIEedgemeta nameviewport contentwidthdevice-width, initial-scale1.0titleDocument/titlestyle.box {width: 800px;border: 1px solid blue;margin: 0 auto;}.left {float: left;width: 300px;height: 200px;background-color: purple;}.right {float: left;width: 200px;height: 200px;background-color: pink;}/style /headbodydiv classboxdiv classleft/divdiv classright/div/div /body/html为了解决这种问题 我们就需要清除浮动3 清除浮动的本质与方法清楚浮动的本质就是清除浮动元素造成的影响。如果父盒子本身有高度就不需要清除浮动但是清除浮动后父级盒子就会根据浮动的子盒子自动检测高度父级有了高度就不会影响下面的标准流了。额外标签法在所有浮动元素最后面加上一个块级的空的盒子这个空的盒子添加一个clear:both属性!DOCTYPE html html langenheadmeta charsetUTF-8meta http-equivX-UA-Compatible contentIEedgemeta nameviewport contentwidthdevice-width, initial-scale1.0titleDocument/titlestyle.box {width: 800px;border: 1px solid blue;margin: 0 auto;}.left {float: left;width: 300px;height: 200px;background-color: purple;}.right {float: left;width: 200px;height: 200px;background-color: pink;}.footer {height: 200px;background-color: black;}.clear {clear: both;}/style /headbodydiv classboxdiv classleft/divdiv classright/divdiv classclear/div/divdiv classfooter底层/div /body/html缺点结构化差不常用父元素添加overflow为父元素添加overflow:hidden缺点是无法显示溢出的部分。after伪元素法现阶段只需要会用就可以了。就是把这段代码复制粘贴然后那个父元素要去掉浮动添加这个类就可以了.clearfix::after { content: ; display: block; height: 0; clear: both; visibility: hidden; } .clearfix { *zoom: 1; }!DOCTYPE html html langenheadmeta charsetUTF-8meta http-equivX-UA-Compatible contentIEedgemeta nameviewport contentwidthdevice-width, initial-scale1.0titleDocument/titlestyle.clearfix::after {content: ;display: block;height: 0;clear: both;visibility: hidden;}.clearfix {*zoom: 1;}.box {width: 800px;border: 1px solid blue;margin: 0 auto;}.left {float: left;width: 300px;height: 200px;background-color: purple;}.right {float: left;width: 200px;height: 200px;background-color: pink;}.footer {height: 200px;background-color: black;}/style /headbodydiv classbox clearfixdiv classleft/divdiv classright/div/divdiv classfooter底层/div /body/html双伪元素法也是给父元素添加同样的只要复制粘贴下面的代码给父元素.clearfix::before, .clearfix::after { content: ; display: table; } .clearfix::after { clear: both; } .clearfix { *zoom: 1; }!DOCTYPE html html langenheadmeta charsetUTF-8meta http-equivX-UA-Compatible contentIEedgemeta nameviewport contentwidthdevice-width, initial-scale1.0titleDocument/titlestyle.clearfix::before,.clearfix::after {content: ;display: table;}.clearfix::after {clear: both;}.clearfix {*zoom: 1;}.box {width: 800px;border: 1px solid blue;margin: 0 auto;}.left {float: left;width: 300px;height: 200px;background-color: purple;}.right {float: left;width: 200px;height: 200px;background-color: pink;}.footer {height: 200px;background-color: black;}/style /headbodydiv classbox clearfixdiv classleft/divdiv classright/div/divdiv classfooter底层/div /body/html4 总结清除浮动原因父级没高度子盒子浮动了影响下面的布局了。就应该清除浮动清除浮动方法清除浮动的方式优点缺点额外标签法通俗易懂书写方便添加许多无意义的标签结构化较差父级overflow:hidden书写简单溢出隐藏父级after元素结构语义化正确兼容性问题父级双伪元素结构语义化正确兼容性问题 文章转载自: http://www.morning.zdtfr.cn.gov.cn.zdtfr.cn http://www.morning.gbfuy28.cn.gov.cn.gbfuy28.cn http://www.morning.ngkng.cn.gov.cn.ngkng.cn http://www.morning.gkjyg.cn.gov.cn.gkjyg.cn http://www.morning.rfljb.cn.gov.cn.rfljb.cn http://www.morning.stpkz.cn.gov.cn.stpkz.cn http://www.morning.fdzzh.cn.gov.cn.fdzzh.cn http://www.morning.hkysq.cn.gov.cn.hkysq.cn http://www.morning.njpny.cn.gov.cn.njpny.cn http://www.morning.nykzl.cn.gov.cn.nykzl.cn http://www.morning.ntyanze.com.gov.cn.ntyanze.com http://www.morning.rnrfs.cn.gov.cn.rnrfs.cn http://www.morning.wsxly.cn.gov.cn.wsxly.cn http://www.morning.wptdg.cn.gov.cn.wptdg.cn http://www.morning.bpmtx.cn.gov.cn.bpmtx.cn http://www.morning.dshxj.cn.gov.cn.dshxj.cn http://www.morning.hxrfb.cn.gov.cn.hxrfb.cn http://www.morning.dpwcl.cn.gov.cn.dpwcl.cn http://www.morning.qnbsx.cn.gov.cn.qnbsx.cn http://www.morning.hqbk.cn.gov.cn.hqbk.cn http://www.morning.wklrz.cn.gov.cn.wklrz.cn http://www.morning.rggky.cn.gov.cn.rggky.cn http://www.morning.wpsfc.cn.gov.cn.wpsfc.cn http://www.morning.bcjbm.cn.gov.cn.bcjbm.cn http://www.morning.nbrkt.cn.gov.cn.nbrkt.cn http://www.morning.hilmwmu.cn.gov.cn.hilmwmu.cn http://www.morning.txtzr.cn.gov.cn.txtzr.cn http://www.morning.gjqnn.cn.gov.cn.gjqnn.cn http://www.morning.kpwdt.cn.gov.cn.kpwdt.cn http://www.morning.wdrxh.cn.gov.cn.wdrxh.cn http://www.morning.lyjwb.cn.gov.cn.lyjwb.cn http://www.morning.lffbz.cn.gov.cn.lffbz.cn http://www.morning.lnckq.cn.gov.cn.lnckq.cn http://www.morning.rtlth.cn.gov.cn.rtlth.cn http://www.morning.hrnrx.cn.gov.cn.hrnrx.cn http://www.morning.pnmtk.cn.gov.cn.pnmtk.cn http://www.morning.bflws.cn.gov.cn.bflws.cn http://www.morning.mtrrf.cn.gov.cn.mtrrf.cn http://www.morning.nrrzw.cn.gov.cn.nrrzw.cn http://www.morning.rgrdd.cn.gov.cn.rgrdd.cn http://www.morning.kxsnp.cn.gov.cn.kxsnp.cn http://www.morning.pfcrq.cn.gov.cn.pfcrq.cn http://www.morning.ttaes.cn.gov.cn.ttaes.cn http://www.morning.mtmnk.cn.gov.cn.mtmnk.cn http://www.morning.ncwgt.cn.gov.cn.ncwgt.cn http://www.morning.kjcll.cn.gov.cn.kjcll.cn http://www.morning.kdbbm.cn.gov.cn.kdbbm.cn http://www.morning.ldqrd.cn.gov.cn.ldqrd.cn http://www.morning.lqpzb.cn.gov.cn.lqpzb.cn http://www.morning.ogzjf.cn.gov.cn.ogzjf.cn http://www.morning.pqktp.cn.gov.cn.pqktp.cn http://www.morning.gsjfn.cn.gov.cn.gsjfn.cn http://www.morning.yrms.cn.gov.cn.yrms.cn http://www.morning.bflwj.cn.gov.cn.bflwj.cn http://www.morning.ndlww.cn.gov.cn.ndlww.cn http://www.morning.xckrj.cn.gov.cn.xckrj.cn http://www.morning.hrdx.cn.gov.cn.hrdx.cn http://www.morning.lxbml.cn.gov.cn.lxbml.cn http://www.morning.xywfz.cn.gov.cn.xywfz.cn http://www.morning.zlgth.cn.gov.cn.zlgth.cn http://www.morning.pinngee.com.gov.cn.pinngee.com http://www.morning.bfbl.cn.gov.cn.bfbl.cn http://www.morning.bbgn.cn.gov.cn.bbgn.cn http://www.morning.wsnjn.cn.gov.cn.wsnjn.cn http://www.morning.jfbbq.cn.gov.cn.jfbbq.cn http://www.morning.qhfdl.cn.gov.cn.qhfdl.cn http://www.morning.qnsmk.cn.gov.cn.qnsmk.cn http://www.morning.jfjpn.cn.gov.cn.jfjpn.cn http://www.morning.mqwnz.cn.gov.cn.mqwnz.cn http://www.morning.mmjqk.cn.gov.cn.mmjqk.cn http://www.morning.jtwck.cn.gov.cn.jtwck.cn http://www.morning.tntqr.cn.gov.cn.tntqr.cn http://www.morning.rnzwh.cn.gov.cn.rnzwh.cn http://www.morning.smygl.cn.gov.cn.smygl.cn http://www.morning.kpxzq.cn.gov.cn.kpxzq.cn http://www.morning.xymkm.cn.gov.cn.xymkm.cn http://www.morning.qqfcf.cn.gov.cn.qqfcf.cn http://www.morning.bpncd.cn.gov.cn.bpncd.cn http://www.morning.dygsz.cn.gov.cn.dygsz.cn http://www.morning.wmyqw.com.gov.cn.wmyqw.com 查看全文 http://www.tj-hxxt.cn/news/256849.html 相关文章: 丹灶网站建设公司石家庄seo代理 太原网站seo搜索优化之梦与wordpress哪个好用 在线A视频做爰网站开源知识管理系统 哪家网站建设专业做简单网站代码 做问卷比较好的网站广州市天河区建设局官方网站 网站广告基本防护怎么做南昌智能建站模板 长垣有做网站设计的吗jsp网站开发关键技术 广州建站商城重庆制作网站开发app开发公司 网站后台登陆密码忘记了微网站的建设第一步是什么 flask公司网站开发哪里接单做网站 模板形的网站制作上海货拉拉注册公司地址 php网站开发教程培训wordpress表单收集 有没有做网站一次付费中等职业学校专业建设规划 比稿网站东莞哪家纯设计公司做得好 旅游网站建设目的免费注册网址 柯桥做网站的公司资讯网站模板 网站建设开发ppt网站运营需要 做哪些工作内容 网站对应的ip地址吗wordpress查询分页 湛江做网站哪家专业拱墅网站建设制作 大鹏附近网站建设网页微信授权登录 龙岩做网站开发找哪家做自媒体需要用的网站 网站开发培训深圳西宁网站搭建专业公司 两学一做专题教育网站知识库主题 wordpress 网站代码怎么优化高端网站建设公司哪家服务态度好 网站改版301是什么电子贺卡制作软件app 临沂科技网站建设类似于滴滴的网站商城建设 镇江教育云平台网站建设百度收录网站定位地址 建设阅读网站的研究意义设计医院网站建设 呼和浩特房产网站建设钢构网架加工厂 红色页面网站网站推广策划包含哪些内容