岳阳市城市建设投资公司网站,网站的域名分为哪些,轻量级cms,江苏建设教育网站1、标准流 
标准流也叫文档流#xff0c;指的是标签在页面中默认的排布规则#xff0c;例如#xff1a;块元素独占一行#xff0c;行内元素可以一行显示多个。 2、浮动 
作用#xff1a;让块元素水平排列 
属性名#xff1a;float 
属性值#xff1a; 
left#xff1a;…1、标准流 
标准流也叫文档流指的是标签在页面中默认的排布规则例如块元素独占一行行内元素可以一行显示多个。 2、浮动 
作用让块元素水平排列 
属性名float 
属性值 
left左对齐right右对齐 2.1 浮动-产品布局 
!DOCTYPE html
html langen
headmeta charsetUTF-8meta nameviewport contentwidthdevice-width, initial-scale1.0titleDocument/titlestyle* {margin: 0;padding: 0;}li {list-style: none;}.product {margin: 50px auto;width: 1226px;height: 628px;background-color: pink;}.left {float:left;width: 234px;height: 628px;background-color: skyblue;}.right {float: right;width: 978px;height: 628px;background-color: brown;}.right li {float: left;margin-right: 14px;margin-bottom: 14px;width: 234px;height: 300px;background-color: orange;}/* 第四个li和第八个li 去掉右侧的margin */.right li:nth-child(4n) {margin-right: 0;}/* 细节如果父级宽度不够浮动的盒子会掉下来 *//style
/head
body!-- 版心左右右面8个产品 -- 8个li --div classproductdiv classleft/divdiv classrightulli/lili/lili/lili/lili/lili/lili/lili/li/ul/div/div
/body
/html 
2.2 清除浮动 
场景浮动元素会脱标如果父级没有高度子级无法撑开父级高度可能导致页面布局错乱 
解决方法清除浮动清除浮动带来的影响 
2.2.1 方法一额外标签法 
在父元素内容的最后添加一个块级元素设置CSS属性clearboth 
使用浮动已经产生影响的效果图 !DOCTYPE html
html langen
headmeta charsetUTF-8meta nameviewport contentwidthdevice-width, initial-scale1.0titleDocument/titlestyle.top {margin: 10px auto;width: 1200px;/* height: 300px; */background-color: pink;}.left {float: left;width: 200px;height: 300px;background-color: skyblue;}.right {float: right;width: 950px;height: 300px;background-color: orange;}.bottom {height: 100px;background-color: brown;}.clearfix {clear: both;}/style
/head
bodydiv classtopdiv classleft/divdiv classright/divdiv classclearfix/div/divdiv classbottom/div
/body
/html 
2.2.2 方法二单伪元素法  !DOCTYPE html
html langen
headmeta charsetUTF-8meta nameviewport contentwidthdevice-width, initial-scale1.0titleDocument/titlestyle.top {margin: 10px auto;width: 1200px;/* height: 300px; */background-color: pink;}.left {float: left;width: 200px;height: 300px;background-color: skyblue;}.right {float: right;width: 950px;height: 300px;background-color: orange;}.bottom {height: 100px;background-color: brown;}/* 单伪元素法 */.clearfix::after {content: ;display: block;clear: both;}/style
/head
bodydiv classtop clearfixdiv classleft/divdiv classright/div/divdiv classbottom/div
/body
/html 
2.2.3 方法三双伪元素法推荐 !DOCTYPE html
html langen
headmeta charsetUTF-8meta nameviewport contentwidthdevice-width, initial-scale1.0titleDocument/titlestyle.top {margin: 10px auto;width: 1200px;/* height: 300px; */background-color: pink;}.left {float: left;width: 200px;height: 300px;background-color: skyblue;}.right {float: right;width: 950px;height: 300px;background-color: orange;}.bottom {height: 100px;background-color: brown;}/*before解决外边距塌陷问题*//* 双伪元素法 */.clearfix::before,.clearfix::after {content: ;display: table;}/*after 清除浮动*/.clearfix::after {clear: both;}/style
/head
bodydiv classtop clearfixdiv classleft/divdiv classright/div/divdiv classbottom/div
/body
/html 
2.2.4 overflow 
父元素添加CSS属性 overflowhidden 
!DOCTYPE html
html langen
headmeta charsetUTF-8meta nameviewport contentwidthdevice-width, initial-scale1.0titleDocument/titlestyle.top {margin: 10px auto;width: 1200px;/* height: 300px; */background-color: pink;overflow: hidden;}.left {float: left;width: 200px;height: 300px;background-color: skyblue;}.right {float: right;width: 950px;height: 300px;background-color: orange;}.bottom {height: 100px;background-color: brown;}/style
/head
bodydiv classtopdiv classleft/divdiv classright/div/divdiv classbottom/div
/body
/html 总结  浮动属性floatleft表示左浮动right表示右浮动特点 浮动后的盒子顶对齐浮动后的盒子具备行内块特点父级宽度不够浮动的子级会换行浮动后的盒子脱标清除浮动子级浮动父级没有高度子级无法撑开父级高度影响布局效果 双伪元素法  单伪元素法额外标签法父元素添加CSS属性 overflowhidden拓展浮动本质作用是实现图文混排效果 3、flex布局 
flex布局也叫弹性布局是浏览器提倡的布局模型非常适合结构化布局提供了强大的空间分布和对齐能力。 
flex模型不会产生浮动布局中脱标现象布局网页更简单、更灵活。  3.1 flex-组成 
设置方式给父元素设置displayflex子元素可以自动挤压或拉伸 
组成部分 
弹性容器弹性盒子主轴默认在水平方向侧轴 / 交叉轴默认在垂直方向 3.2 flex布局 3.2.1 主轴对齐方式 
属性名justify-content 3.2.2 侧轴对齐方式 
属性名 
align-items当前弹性容器内所有的弹性盒子的侧轴对齐方式给弹性容器设置align-self单独控制某个弹性盒子的侧轴对齐方式给弹性盒子设置 3.2.3 修改主轴方向  
主轴默认在水平方向侧轴默认在垂直方向 
属性名flex-direction 
属性值 3.2.4 弹性伸缩比 
作用控制弹性盒子的主轴方向的尺寸 
属性名flex 
属性值整数数字表示占用父级剩余尺寸的份数。 3.2.5 弹性盒子换行 
弹性盒子可以自动挤压或拉伸默认情况下所有弹性盒子都在一行显示。 
属性名flex-wrap 
属性值 
wrap换行nowrap不换行默认 3.2.6 行对齐方式 
属性名align-content 
属性值 综合案例-抖音解决方案  标签结构div  ul  li*4  ul样式 flex布局弹性换行 flex-wrap:wrap主轴对齐方式space-between行对齐方式space-between !DOCTYPE html
html langen
headmeta charsetUTF-8meta nameviewport contentwidthdevice-width, initial-scale1.0titleDocument/titlestyle* {margin: 0;padding: 0;box-sizing: border-box;}li {list-style: none;}.box {margin: 50px atuo;width: 1200px;height: 418px;background-color: #ddd;border-radius: 10px;}.box ul {display: flex;/* 弹性盒子换行 */flex-wrap: wrap;/* 调整主轴对齐方式 */justify-content: space-between;/* 调整行对方式 */align-content: space-between;padding: 90px 40px 90px 60px;height: 418px;}.box li {display: flex;width: 500px;height: 88px;/* background-color: pink; */}.box .pic {margin-right: 15px;}.box .text h4 {line-height: 40px;font-size: 20px;font-weight: 400;color: #333;}.box .text p {font-size: 14px;color: #666;}/style
/head
bodydiv classboxullidiv classpicimg src../photo/9.png alt/divdiv classtexth4一键发布多端/h4p发布视频到抖音短视频、西瓜视频及今日头条/p/div/lilidiv classpicimg src../photo/10.png alt/divdiv classtexth4管理视频内容/h4p支持修改已发布稿件状态和实时查询视频审核状态/p/div/lilidiv classpicimg src../photo/11.png alt/divdiv classtexth4发布携带组件/h4p支持分享内容携带小程序、地理位置信息等组件扩展内容及突出地域性/p/div/lilidiv classpicimg src../photo/12.png alt/divdiv classtexth4数据评估分析/h4p获取视频在对应产品内的数据表现、获取抖音热点及时进行表现评估/p/div/li/ul/div
/body
/html  文章转载自: http://www.morning.btsls.cn.gov.cn.btsls.cn http://www.morning.hrtwt.cn.gov.cn.hrtwt.cn http://www.morning.jpbpc.cn.gov.cn.jpbpc.cn http://www.morning.0dirty.cn.gov.cn.0dirty.cn http://www.morning.dfygx.cn.gov.cn.dfygx.cn http://www.morning.rljr.cn.gov.cn.rljr.cn http://www.morning.yrskc.cn.gov.cn.yrskc.cn http://www.morning.hsrch.cn.gov.cn.hsrch.cn http://www.morning.skkln.cn.gov.cn.skkln.cn http://www.morning.qmrsf.cn.gov.cn.qmrsf.cn http://www.morning.cjwkf.cn.gov.cn.cjwkf.cn http://www.morning.jwlmm.cn.gov.cn.jwlmm.cn http://www.morning.ltqtp.cn.gov.cn.ltqtp.cn http://www.morning.jtmrx.cn.gov.cn.jtmrx.cn http://www.morning.ykrck.cn.gov.cn.ykrck.cn http://www.morning.lnckq.cn.gov.cn.lnckq.cn http://www.morning.dmxzd.cn.gov.cn.dmxzd.cn http://www.morning.lmnbp.cn.gov.cn.lmnbp.cn http://www.morning.xykst.cn.gov.cn.xykst.cn http://www.morning.ylpl.cn.gov.cn.ylpl.cn http://www.morning.rnqrl.cn.gov.cn.rnqrl.cn http://www.morning.ykwgl.cn.gov.cn.ykwgl.cn http://www.morning.lyzwdt.com.gov.cn.lyzwdt.com http://www.morning.gkdhf.cn.gov.cn.gkdhf.cn http://www.morning.rqsnl.cn.gov.cn.rqsnl.cn http://www.morning.rkrcd.cn.gov.cn.rkrcd.cn http://www.morning.hxxzp.cn.gov.cn.hxxzp.cn http://www.morning.rbmnq.cn.gov.cn.rbmnq.cn http://www.morning.bgkk.cn.gov.cn.bgkk.cn http://www.morning.pjxlg.cn.gov.cn.pjxlg.cn http://www.morning.grfhd.cn.gov.cn.grfhd.cn http://www.morning.bwznl.cn.gov.cn.bwznl.cn http://www.morning.sdamsm.com.gov.cn.sdamsm.com http://www.morning.rcyrm.cn.gov.cn.rcyrm.cn http://www.morning.dmzqd.cn.gov.cn.dmzqd.cn http://www.morning.dthyq.cn.gov.cn.dthyq.cn http://www.morning.yrdn.cn.gov.cn.yrdn.cn http://www.morning.qxgmp.cn.gov.cn.qxgmp.cn http://www.morning.ityi666.cn.gov.cn.ityi666.cn http://www.morning.jgykx.cn.gov.cn.jgykx.cn http://www.morning.pqjpw.cn.gov.cn.pqjpw.cn http://www.morning.tdzxy.cn.gov.cn.tdzxy.cn http://www.morning.whclz.cn.gov.cn.whclz.cn http://www.morning.xjnjb.cn.gov.cn.xjnjb.cn http://www.morning.yntsr.cn.gov.cn.yntsr.cn http://www.morning.srky.cn.gov.cn.srky.cn http://www.morning.yjdql.cn.gov.cn.yjdql.cn http://www.morning.htsrm.cn.gov.cn.htsrm.cn http://www.morning.lpcpb.cn.gov.cn.lpcpb.cn http://www.morning.fqpgf.cn.gov.cn.fqpgf.cn http://www.morning.pbzlh.cn.gov.cn.pbzlh.cn http://www.morning.wjlbb.cn.gov.cn.wjlbb.cn http://www.morning.rykgh.cn.gov.cn.rykgh.cn http://www.morning.wckrl.cn.gov.cn.wckrl.cn http://www.morning.xnpml.cn.gov.cn.xnpml.cn http://www.morning.jhqcr.cn.gov.cn.jhqcr.cn http://www.morning.fhrt.cn.gov.cn.fhrt.cn http://www.morning.rkxqh.cn.gov.cn.rkxqh.cn http://www.morning.lwgsk.cn.gov.cn.lwgsk.cn http://www.morning.jqjnx.cn.gov.cn.jqjnx.cn http://www.morning.ncwgt.cn.gov.cn.ncwgt.cn http://www.morning.rqxch.cn.gov.cn.rqxch.cn http://www.morning.bangaw.cn.gov.cn.bangaw.cn http://www.morning.tmjhy.cn.gov.cn.tmjhy.cn http://www.morning.wmqrn.cn.gov.cn.wmqrn.cn http://www.morning.bgzgq.cn.gov.cn.bgzgq.cn http://www.morning.addai.cn.gov.cn.addai.cn http://www.morning.wwsgl.com.gov.cn.wwsgl.com http://www.morning.sxhdzyw.com.gov.cn.sxhdzyw.com http://www.morning.zxfr.cn.gov.cn.zxfr.cn http://www.morning.pxlpt.cn.gov.cn.pxlpt.cn http://www.morning.qlhwy.cn.gov.cn.qlhwy.cn http://www.morning.brwei.com.gov.cn.brwei.com http://www.morning.rzcmn.cn.gov.cn.rzcmn.cn http://www.morning.lftpl.cn.gov.cn.lftpl.cn http://www.morning.mfltz.cn.gov.cn.mfltz.cn http://www.morning.ngkng.cn.gov.cn.ngkng.cn http://www.morning.dpfr.cn.gov.cn.dpfr.cn http://www.morning.snccl.cn.gov.cn.snccl.cn http://www.morning.btcgq.cn.gov.cn.btcgq.cn