外贸做网站公司哪家好,wordpress 镇企,wordpress主题制作详解,东莞短视频推广方法一.理论部分
1.为什么要清除浮动#xff0c;清除浮动的方法有哪些#xff1f;#xff08;至少两种#xff09;
由于父级盒子很多情况下#xff0c;不方便给高度#xff0c;但是子盒子浮动又不占有位置#xff0c;最后父级盒子高度为0时#xff0c;就会影响下面的标准…一.理论部分
1.为什么要清除浮动清除浮动的方法有哪些至少两种
由于父级盒子很多情况下不方便给高度但是子盒子浮动又不占有位置最后父级盒子高度为0时就会影响下面的标准流盒子。
清除浮动clear:both;
清除浮动方法
①额外标签法/隔墙法
在最后一个浮动的子元素后面添加一个额外标签, 添加清除浮动样式.例如div style”clear:both”/div或者其他标签如br/等
要求这个新的空标签必须是块级元素
②父级添加overflow属性
可以给父级添加overflow属性将其属性值设置为hidden、auto或scroll
③父级添加after伪元素
.clearfix:after{content: ;//伪元素必须写的属性display: block;//插入的元素必须为块级元素height: 0;//不要看见这个元素 clear: both;//清除浮动代码visibility: hidden;//不要看见这个元素
}
.clearfix {*zoom: 1;/*IE6,7专有*/
}④父级添加双伪元素
.clearfix:before,.clearfix:after{content: ;display: table;//转化为块级元素并且一行显示
}
.clearfix:after {clear:both;
}
.clearfix {*zoom: 1;
}
2.怎么实现左边宽度固定右边宽度自适应的布局
父盒子使用flex布局左边的子盒子给一个固定的宽度右边的盒子flex:1;
!DOCTYPE html
html langenheadmeta charsetUTF-8meta nameviewport contentwidthdevice-width, initial-scale1.0titleDocument/titlestyle.container {display: flex;//切记width: 60%;height: 150px;background-color: pink;margin: 0 auto;}.left {width: 100px;height: 150px;background-color: purple;}.right {flex: 1;background-color: skyblue;}/style
/headbodydiv classcontainerdiv classleft/divdiv classright/div/div
/body/html
3.讲讲flex:1;
flex:1表示子项目占剩余空间的1份剩余空间就是看子盒子有没有给宽度
4.怎么实现移动端适配不同设备
使用rem布局和响应式布局rem布局和媒体查询结合使用响应式布局和bootstrap一起使用
二.实操部分 音波 css代码
.dajianshi {margin: 100px auto;width: 200px;height: 120px;display: flex;}.dajianshi span {width: 10px;border-radius: 18px;margin-right: 10px;animation: bar 2s infinite linear;}.dajianshi span:nth-child(1) {animation-delay: 0.2s;}.dajianshi span:nth-child(2) {animation-delay: 0.4s;}.dajianshi span:nth-child(3) {animation-delay: 0.6s;}.dajianshi span:nth-child(4) {animation-delay: 0.8s;}.dajianshi span:nth-child(5) {animation-delay: 1.0s;}.dajianshi span:nth-child(6) {animation-delay: 1.2s;}.dajianshi span:nth-child(7) {animation-delay: 1.4s;}keyframes bar {0% {background: red;margin-top: 25%;height: 10%;}50% {background: red;height: 100%;margin-top: 0%;}100% {background: red;height: 10%;margin-top: 25%;}}
html代码
div classdajianshispan/spanspan/spanspan/spanspan/spanspan/spanspan/spanspan/span
/div 爱心怦怦跳 css代码 * {margin: 0;padding: 0;}body {display: flex;justify-content: center;align-items: center;background-color: #000;}.heart-container {display: flex;justify-content: center;align-items: center;width: 231px;/* 9 * 15px width 8 * 12px gap */height: 300px;gap: 12px;position: relative;}.bar {width: 15px;border-radius: 10px;height: 15px;position: absolute;top: 50%;transform: translateY(-50%);animation: 7.4s infinite;}.bar:nth-child(1) {background-color: #ff0000;left: 0px;animation-name: animate-bar-1;}.bar:nth-child(2) {background-color: #00e5ff;left: 27px;animation-name: animate-bar-2;animation-delay: 0.4s;}.bar:nth-child(3) {background-color: #ffb6af;left: 54px;animation-name: animate-bar-3;animation-delay: 0.8s;}.bar:nth-child(4) {background-color: #ff00c8;left: 81px;animation-name: animate-bar-4;animation-delay: 1.2s;}.bar:nth-child(5) {background-color: #ffff00;left: 108px;animation-name: animate-bar-5;animation-delay: 1.6s;}.bar:nth-child(6) {background-color: #ff00c8;left: 135px;animation-name: animate-bar-6;animation-delay: 1.8s;}.bar:nth-child(7) {background-color: #ffb6af;left: 162px;animation-name: animate-bar-7;animation-delay: 2.0s;}.bar:nth-child(8) {background-color: #00e5ff;left: 189px;animation-name: animate-bar-8;animation-delay: 2.2s;}.bar:nth-child(9) {background-color: #ff0000;left: 216px;animation-name: animate-bar-9;animation-delay: 2.4s;}keyframes animate-bar-1 {0%,100% {height: 15px;transform: translateY(-50%);}60% {height: 40px;transform: translateY(calc(-50% -5px));}}keyframes animate-bar-2 {0%,100% {height: 15px;transform: translateY(-50%);}50% {height: 80px;transform: translateY(calc(-50% -10px));}}keyframes animate-bar-3 {0%,100% {height: 15px;transform: translateY(-50%);}50% {height: 110px;transform: translateY(calc(-50% -10px));}}keyframes animate-bar-4 {0%,100% {height: 15px;transform: translateY(-50%);}50% {height: 120px;transform: translateY(calc(-50% 20px));}}keyframes animate-bar-5 {0%,100% {height: 15px;transform: translateY(-50%);}50% {height: 140px;transform: translateY(calc(-50% 40px));}}keyframes animate-bar-6 {0%,100% {height: 15px;transform: translateY(-50%);}50% {height: 120px;transform: translateY(calc(-50% 20px));}}keyframes animate-bar-7 {0%,100% {height: 15px;transform: translateY(-50%);}50% {height: 110px;transform: translateY(calc(-50% -10px));}}keyframes animate-bar-8 {0%,100% {height: 15px;transform: translateY(-50%);}50% {height: 80px;transform: translateY(calc(-50% -10px));}}keyframes animate-bar-9 {0%,100% {height: 15px;transform: translateY(-50%);}50% {height: 40px;transform: translateY(calc(-50% -5px));}}
html代码 div classheart-containerdiv classbar/divdiv classbar/divdiv classbar/divdiv classbar/divdiv classbar/divdiv classbar/divdiv classbar/divdiv classbar/divdiv classbar/div/div 数字日历 css代码 * {margin: 0;padding: 0;}div {margin: 10px 0 0 10px;width: 50px;height: 70px;background-color: greenyellow;overflow: hidden;font-weight: 600;border-radius: 5px;color: black;}ul {line-height: 70px;text-align: center;width: 50px;background-color: greenyellow;animation: move 6s infinite alternate;}ul li {list-style: none;}keyframes move {0% {transform: translateY(0px);}11% {transform: translateY(-70px);}22% {transform: translateY(-140px);}33% {transform: translateY(-210px);}44% {transform: translateY(-280px);}55% {transform: translateY(-350px);}66% {transform: translateY(-420px);}77% {transform: translateY(-490px);}88% {transform: translateY(-560px);}100% {transform: translateY(-630px);}}
html代码 divulli0/lili1/lili2/lili3/lili4/lili5/lili6/lili7/lili8/lili9/li/ul/div css代码 * {margin: 0;padding: 0;box-sizing: border-box;}body {background-color: #f8f8f8;color: #333;line-height: 1.6;}/* 版心容器 */.container {width: 1200px;margin: 0 auto;padding: 0 32px;}/* 导航栏样式 */header {background-color: #333;border-radius: 5px;}.navbar {display: flex;justify-content: space-between;align-items: center;color: white;padding: 10px 32px;margin: 10px auto 0;border-radius: 10px;}.nav-links {display: flex;gap: 32px;}.nav-links span {color: white;font-size: 16px;}/* 卡片容器 */.card-container {display: flex;flex-wrap: wrap;justify-content: space-between;margin: 20px auto;gap: 24px;}/* 卡片样式 */.card {background-color: white;border-radius: 8px;box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);overflow: hidden;width: calc(33.333% - 16px);display: flex;flex-direction: column;}.card-image {margin: 15px 15px 0px;border-radius: 8px;height: 100px;background-color: #d9d9d9;}.card-title {font-size: 24px;margin: 10px 16px;font-weight: bold;}.card-description {padding: 0 16px;color: #666;flex: 1;}.card-meta {padding: 0 0 10px 16px;color: #999;font-size: 15px;margin-top: 8px;}/* 底部 */.footer-banner {background-color: #f0f0f0;text-align: center;padding: 10px;margin: 10px auto;border-radius: 4px;color: #666;}
html代码
div classcontainerheadernav classnavbardiv classlogo考核/divdiv classnav-linksspan首页/spanspan文章/spanspan关于我们/span/div/nav/headerdiv classcard-containerdiv classcarddiv classcard-image/divh2 classcard-title标题1/h2p classcard-description这是一段摘要内容描述当前文章的简要信息。这是一段摘要内容描述当前文章的.../pdiv classcard-meta发布于 2025-06-01 · 阅读 123/div/divdiv classcarddiv classcard-image/divh2 classcard-title标题2/h2p classcard-description这是一段摘要内容描述当前文章的简要信息。/pdiv classcard-meta发布于 2025-06-02 · 阅读 456/div/divdiv classcarddiv classcard-image/divh2 classcard-title标题3/h2p classcard-description这是一段摘要内容描述当前文章的简要信息。/pdiv classcard-meta发布于 2025-06-03 · 阅读 789/div/div/divdiv classfooter-bannerweb第一次方向考核/div/div 文章转载自: http://www.morning.bpmfn.cn.gov.cn.bpmfn.cn http://www.morning.prhfc.cn.gov.cn.prhfc.cn http://www.morning.gsksm.cn.gov.cn.gsksm.cn http://www.morning.yxnkr.cn.gov.cn.yxnkr.cn http://www.morning.jfsbs.cn.gov.cn.jfsbs.cn http://www.morning.hffpy.cn.gov.cn.hffpy.cn http://www.morning.bxbnf.cn.gov.cn.bxbnf.cn http://www.morning.yrdt.cn.gov.cn.yrdt.cn http://www.morning.pmdnx.cn.gov.cn.pmdnx.cn http://www.morning.wsnbg.cn.gov.cn.wsnbg.cn http://www.morning.mlnbd.cn.gov.cn.mlnbd.cn http://www.morning.gynls.cn.gov.cn.gynls.cn http://www.morning.gcqkb.cn.gov.cn.gcqkb.cn http://www.morning.rwrn.cn.gov.cn.rwrn.cn http://www.morning.mqbsm.cn.gov.cn.mqbsm.cn http://www.morning.lzzqz.cn.gov.cn.lzzqz.cn http://www.morning.dqpd.cn.gov.cn.dqpd.cn http://www.morning.hgcz.cn.gov.cn.hgcz.cn http://www.morning.rkmsm.cn.gov.cn.rkmsm.cn http://www.morning.smkxm.cn.gov.cn.smkxm.cn http://www.morning.gnyhc.cn.gov.cn.gnyhc.cn http://www.morning.ffbl.cn.gov.cn.ffbl.cn http://www.morning.zcfmb.cn.gov.cn.zcfmb.cn http://www.morning.bxdlrcz.cn.gov.cn.bxdlrcz.cn http://www.morning.skdrp.cn.gov.cn.skdrp.cn http://www.morning.fdlyh.cn.gov.cn.fdlyh.cn http://www.morning.jglqn.cn.gov.cn.jglqn.cn http://www.morning.mzbyl.cn.gov.cn.mzbyl.cn http://www.morning.pmjw.cn.gov.cn.pmjw.cn http://www.morning.tjpmf.cn.gov.cn.tjpmf.cn http://www.morning.fmznd.cn.gov.cn.fmznd.cn http://www.morning.pgzgy.cn.gov.cn.pgzgy.cn http://www.morning.mxgpp.cn.gov.cn.mxgpp.cn http://www.morning.xhgcr.cn.gov.cn.xhgcr.cn http://www.morning.mlfgx.cn.gov.cn.mlfgx.cn http://www.morning.qmnjn.cn.gov.cn.qmnjn.cn http://www.morning.cwjxg.cn.gov.cn.cwjxg.cn http://www.morning.qmncj.cn.gov.cn.qmncj.cn http://www.morning.zlmbc.cn.gov.cn.zlmbc.cn http://www.morning.nfqyk.cn.gov.cn.nfqyk.cn http://www.morning.lffgs.cn.gov.cn.lffgs.cn http://www.morning.fxpyt.cn.gov.cn.fxpyt.cn http://www.morning.sskhm.cn.gov.cn.sskhm.cn http://www.morning.tnzwm.cn.gov.cn.tnzwm.cn http://www.morning.blxlf.cn.gov.cn.blxlf.cn http://www.morning.qsbcg.cn.gov.cn.qsbcg.cn http://www.morning.rnnq.cn.gov.cn.rnnq.cn http://www.morning.xstfp.cn.gov.cn.xstfp.cn http://www.morning.zsleyuan.cn.gov.cn.zsleyuan.cn http://www.morning.fnfxp.cn.gov.cn.fnfxp.cn http://www.morning.bmhc.cn.gov.cn.bmhc.cn http://www.morning.nlysd.cn.gov.cn.nlysd.cn http://www.morning.nqgds.cn.gov.cn.nqgds.cn http://www.morning.xkppj.cn.gov.cn.xkppj.cn http://www.morning.jbctp.cn.gov.cn.jbctp.cn http://www.morning.lsgsn.cn.gov.cn.lsgsn.cn http://www.morning.fpryg.cn.gov.cn.fpryg.cn http://www.morning.mgbsp.cn.gov.cn.mgbsp.cn http://www.morning.xsrnr.cn.gov.cn.xsrnr.cn http://www.morning.a3e2r.com.gov.cn.a3e2r.com http://www.morning.jwxmn.cn.gov.cn.jwxmn.cn http://www.morning.zmlnp.cn.gov.cn.zmlnp.cn http://www.morning.rhwty.cn.gov.cn.rhwty.cn http://www.morning.qypjk.cn.gov.cn.qypjk.cn http://www.morning.kttbx.cn.gov.cn.kttbx.cn http://www.morning.bntfy.cn.gov.cn.bntfy.cn http://www.morning.hxwhyjh.com.gov.cn.hxwhyjh.com http://www.morning.prysb.cn.gov.cn.prysb.cn http://www.morning.rflcy.cn.gov.cn.rflcy.cn http://www.morning.gyfwy.cn.gov.cn.gyfwy.cn http://www.morning.spxk.cn.gov.cn.spxk.cn http://www.morning.jwrcz.cn.gov.cn.jwrcz.cn http://www.morning.xprq.cn.gov.cn.xprq.cn http://www.morning.tjqcfw.cn.gov.cn.tjqcfw.cn http://www.morning.ghryk.cn.gov.cn.ghryk.cn http://www.morning.mfltz.cn.gov.cn.mfltz.cn http://www.morning.smhtg.cn.gov.cn.smhtg.cn http://www.morning.hnpkr.cn.gov.cn.hnpkr.cn http://www.morning.zmbzl.cn.gov.cn.zmbzl.cn http://www.morning.fkmyq.cn.gov.cn.fkmyq.cn