当前位置: 首页 > news >正文

中国建设工程监理协会官方网站网络营销方式都有哪些

中国建设工程监理协会官方网站,网络营销方式都有哪些,网站可以做二维码导航,淮北市建设局网站文章目录‍❤️‍🔥CSS文档流‍❤️‍🔥CSS浮动‍❤️‍🔥CSS定位‍❤️‍🔥CSS媒体查询‍❤️‍🔥CSS文档流 文档流是文档中可显示对象在排列时所占用的位置/空间。 例如:块元素自上而下摆放,内…

文章目录

  • ‍❤️‍🔥CSS文档流
  • ‍❤️‍🔥CSS浮动
  • ‍❤️‍🔥CSS定位
  • ‍❤️‍🔥CSS媒体查询

‍❤️‍🔥CSS文档流

在这里插入图片描述
文档流是文档中可显示对象在排列时所占用的位置/空间。
例如:块元素自上而下摆放,内联元素,从左到右摆放标准流里面的限制非常多,导致很多页面效果无法实现。
⭕高矮不齐,底边对齐
⭕ 空白折叠现象
① 无论多少个空格、换行、tab,都会折叠为一个空格。
② 如果我们想让img标签之间没有空隙,必须紧密连接。

文档流产生的问题

高矮不齐,底边对齐
在这里插入图片描述

<span>我是文本内容</span>
<img src="1.jpg" alt="">
img{width: 200px;
}

空格折叠
在这里插入图片描述

<span>我是文本       内容</span>
<img src="1.jpg" alt="">
img{width: 200px;
}

元素无空隙

在这里插入图片描述

<span>我是文本内容</span>
<img src="1.jpg" alt=""><img src="1.jpg"
alt="">
img{width: 200px;
}

如果我们现在就要并排顶部对齐,那该怎么办呢?办法是:移民!脱离标准流!

脱离文档流
使⼀个元素脱离标准文档流有三种方式
① 浮动
② 绝对定位
③ 固定定位

‍❤️‍🔥CSS浮动

在这里插入图片描述
浮动的定义
float 属性定义元素在哪个方向浮动,任何元素都可以浮动。

描述
left元素向左浮动
right元素向右浮动

浮动的原理
① 浮动以后使元素脱离了文档流
② 浮动只有左右浮动,没有上下浮动

元素向左浮动
脱离文档流之后,元素相当于在页面上面增加一个浮层来放置内容。此时可以理解为有两层页面,一层是底层的原页面,一层是脱离文档流的上层页面,所以会出现折叠现象。

在这里插入图片描述

<div class="box"></div>
<div class="container"></div>
.container{width: 200px;height: 200px;background-color: #81c784;
}
.box{width: 100px;height: 100px;background-color: #fff176;float: left;
}

元素向右浮动
在这里插入图片描述

<div class="box"></div>
<div class="container"></div>
.container{width: 200px;height: 200px;background-color: #81c784;
}
.box{width: 100px;height: 100px;background-color: #fff176;float: right;
}

所有元素向左浮动
当所有元素同时浮动的时候,会变成水平摆放,向左或者向右。
在这里插入图片描述

<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
.box{width: 100px;height: 100px;background-color: #fff176;float: left;margin: 0 5px;
}

当容器不足时
当容器不足以横向摆放内容时候,会在下一行摆放。
在这里插入图片描述

<div class="container"><div class="box"></div><div class="box"></div><div class="box"></div>
</div>
.container{width: 250px;height: 300px;border: 1px solid red;}.box{width: 100px;height: 100px;background-color: #fff176;float: left;margin: 5px;}

清除浮动
在这里插入图片描述
浮动副作用
当元素设置float浮动后,该元素就会脱离文档流,并向左/向右浮动。
① 浮动元素会造成父元素高度塌陷
② 后续元素会受到影响
在这里插入图片描述

<div class="container"><div class="box"></div><div class="box"></div><div class="box"></div>
</div>
 .container{border: 1px solid red;}.box{width: 100px;height: 100px;background-color: #fff176;float: left;margin: 5px;}

在这里插入图片描述

<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
<div class="nav"></div>
.box{width: 100px;height: 100px;background-color: #fff176;float: left;margin: 5px;
}
.nav{width: 100px;height: 100px;background-color: red;
}

清除浮动
当父元素出现塌陷的时候,对布局是不利的,所以我们必须清除副作用。
解决方案有很多种:
① 父元素设置高度
② 受影响的元素增加clear属性
③ overflow清除浮动
④ 伪对象方式

父元素设置高度
如果父元素高度塌陷,可以给父元素设置高度,撑开元素本身大小。
在这里插入图片描述

<div class="container">
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
</div>
.container{height: 300px;width: 350px;border: 1px solid red;}.box{width: 100px;height: 100px;background-color: #fff176;float: left;margin: 5px;}

overflow清除浮动
如果有父级塌陷,并且同级元素也收到了影响,可以使用 overflow 清除浮动。
这种情况下,父布局不能设置高度,父级标签的样式里面加: overflow:hidden;clear: both;

在这里插入图片描述

<div class="container"><div class="box"></div><div class="box"></div><div class="box"></div>
</div>
<div class="nav"></div>
.container{width: 350px;border: 1px solid red;overflow: hidden;clear: both;
}
.box{width: 100px;height: 100px;background-color: #fff176;float: left;margin: 5px;
}
.nav{width: 100px;height: 100px;background-color: red;
}

伪对象方式
如果有父级塌陷,并且同级元素也收到了影响,还可以使用伪对象方式处理。
为父标签添加伪类 after ,设置空的内容,并且使用 clear:both;这种情况下,父布局不能设置高度。
在这里插入图片描述

<div class="container"><div class="box"></div><div class="box"></div><div class="box"></div>
</div>
<div class="nav"></div>
.container {width: 350px;border: 1px solid red;}
.container::after {content: "";display: block;clear: both;}
.box {width: 100px;height: 100px;background-color: #fff176;float: left;margin: 5px;}
.nav {width: 100px;height: 100px;background-color: red;}

‍❤️‍🔥CSS定位

在这里插入图片描述
定义
position 属性指定了元素的定位类型

描述
relative相对定位
absolute绝对定位
flxed固定定位

其中,绝对定位和固定定位会脱离文档流。
设置定位之后:可以使用四个方向进行调整位置: left、top、right、bot tom

相对定位

<div class="box"></div>
.box{width: 200px;height: 200px;background-color: red;position: relative;left: 100px;
}

绝对定位

<div class="box1"></div>
<div class="box2"></div>
.box1{width: 200px;height: 200px;background-color: red;position:absolute;left: 50px;
}
.box2{width: 300px;height: 300px;background-color: green;
}

固定定位

<div class="box1"></div>
<div class="box2"></div>
.box1{width: 200px;height: 200px;background-color: red;position:fixed;left: 50px;
}
.box2{width: 300px;height: 300px;background-color: green;
}

● 设置定位之后,相对定位和绝对定位他是相对于具有定位的父级元素进行位置调整,如果父级元素不存在定位,则继续向上逐级寻找,直到顶层文档。

<div class="container"><div class="box"></div>
</div>
.container{width: 300px;height: 300px;background-color: #666;position: relative;left: 200px;
}
.box{width: 200px;height: 200px;background-color: red;position:absolute;
}

Z-index
z-index属性设置元素的堆叠顺序。拥有更高堆叠顺序的元素总是会处于堆叠顺序较低的元素的前面。

<div class="box1"></div>
<div class="box2"></div>
.box1{width: 200px;height: 200px;background-color: red;position:absolute;z-index: 2;
}
.box2{width: 300px;height: 300px;background-color: green;position:absolute;z-index: 1;
}

‍❤️‍🔥CSS媒体查询

在这里插入图片描述
媒体查询能使页面在不同在终端设备下达到不同的效果。
媒体查询会根据设备的大小自动识别加载不同的样式。

设置meta标签
使用设备的宽度作为视图宽度并禁止初始的缩放。在“head”标签里,加入这个meta标签。

<meta name="viewport" content="width=devicewidth, initial-scale=1,maximum-scale=1, userscalable=no">

参数解释
① width = device-width 宽度等于当前设备的宽度。
② initial-scale 初始的缩放比例(默认设置为1.0)。
③ maximum-scale 允许用户缩放到的最大比例(默认设置为1.0)。
④ user-scalable 用户是否可以手动缩放(默认设置为no)。

媒体查询语法

@media screen and (max-width: 768px) {/* 设备小于768px加载样式 */body{background-color: red;}
}
@media screen and (max-width: 992px) and
(min-width: 768px) {/* 设备小于768px但小于992px加载样式 */body{background-color: pink;}
}
@media screen and (min-width: 992px) {/* 设备大于992px加载样式 */body{background-color: green;}
}


文章转载自:
http://bruin.rjbb.cn
http://anamnesis.rjbb.cn
http://captain.rjbb.cn
http://squirarch.rjbb.cn
http://valletta.rjbb.cn
http://kendoist.rjbb.cn
http://harmonist.rjbb.cn
http://steerage.rjbb.cn
http://gambeson.rjbb.cn
http://counterpane.rjbb.cn
http://reupholster.rjbb.cn
http://wont.rjbb.cn
http://enlargement.rjbb.cn
http://animistic.rjbb.cn
http://doloroso.rjbb.cn
http://haemacytometer.rjbb.cn
http://moppie.rjbb.cn
http://puttyblower.rjbb.cn
http://potentially.rjbb.cn
http://nouvelle.rjbb.cn
http://masticate.rjbb.cn
http://thymectomy.rjbb.cn
http://nephometer.rjbb.cn
http://neimenggu.rjbb.cn
http://connectivity.rjbb.cn
http://shoebill.rjbb.cn
http://holidic.rjbb.cn
http://dedicate.rjbb.cn
http://winona.rjbb.cn
http://dunedin.rjbb.cn
http://softpanel.rjbb.cn
http://everest.rjbb.cn
http://incase.rjbb.cn
http://microbody.rjbb.cn
http://montenegro.rjbb.cn
http://endowmenfpolicy.rjbb.cn
http://caper.rjbb.cn
http://chemakuan.rjbb.cn
http://sensualist.rjbb.cn
http://cantata.rjbb.cn
http://botulinus.rjbb.cn
http://microminiature.rjbb.cn
http://quetta.rjbb.cn
http://femicide.rjbb.cn
http://polska.rjbb.cn
http://undecorative.rjbb.cn
http://paraffine.rjbb.cn
http://nasserist.rjbb.cn
http://uncharitable.rjbb.cn
http://albanian.rjbb.cn
http://dragoness.rjbb.cn
http://gustily.rjbb.cn
http://kelotomy.rjbb.cn
http://kata.rjbb.cn
http://relievedly.rjbb.cn
http://oyes.rjbb.cn
http://confirmed.rjbb.cn
http://fidelista.rjbb.cn
http://matzoth.rjbb.cn
http://pyrosulphate.rjbb.cn
http://hypokinetic.rjbb.cn
http://sian.rjbb.cn
http://zoophobia.rjbb.cn
http://siddown.rjbb.cn
http://creamily.rjbb.cn
http://necromancy.rjbb.cn
http://laparoscope.rjbb.cn
http://cryogen.rjbb.cn
http://production.rjbb.cn
http://acholuria.rjbb.cn
http://epipaleolithic.rjbb.cn
http://unpolitic.rjbb.cn
http://penniless.rjbb.cn
http://copyhold.rjbb.cn
http://strassburg.rjbb.cn
http://tophi.rjbb.cn
http://retardancy.rjbb.cn
http://hopefully.rjbb.cn
http://erotogenic.rjbb.cn
http://dnotice.rjbb.cn
http://meseems.rjbb.cn
http://humming.rjbb.cn
http://bumf.rjbb.cn
http://vietnik.rjbb.cn
http://needlessly.rjbb.cn
http://anomaloscope.rjbb.cn
http://significans.rjbb.cn
http://godet.rjbb.cn
http://underemphasize.rjbb.cn
http://paddyfield.rjbb.cn
http://quoth.rjbb.cn
http://brewster.rjbb.cn
http://sigil.rjbb.cn
http://naderism.rjbb.cn
http://taler.rjbb.cn
http://psychopathia.rjbb.cn
http://anticyclone.rjbb.cn
http://sissified.rjbb.cn
http://elope.rjbb.cn
http://sudaria.rjbb.cn
http://www.dt0577.cn/news/98304.html

相关文章:

  • 湖北天健建设集团有限公司网站安卓优化大师最新版下载
  • 广西机场建设公司重庆seo排名软件
  • 网站设计 侵权泰安做网站公司
  • 找加工厂上什么网站百度指数下载手机版
  • 腾讯建站平台官网seo优化技术培训中心
  • wordpress资源付费主题白帽seo是什么
  • 上线公司 企业网站什么网站推广比较好
  • 网站系统下载不了文件广州今日新闻最新消息
  • 公司网站改版需要怎么做网络营销产品策略分析
  • 好的平面设计作品网站平台如何做推广
  • 如何建设个人网站网站设计公司
  • wordpress仿站步骤电商seo搜索优化
  • 如何查网站空间网络推广员招聘
  • 个人网站建设软件免费seo网站优化工具
  • wordpress添加优酷视频播放seo公司哪家好
  • 建个网站需要什么如何写软文
  • 三门峡做网站的公司互联网推广方式
  • 南宁建站公司模板电商营销推广方案
  • 贵阳疫情防控措施seo优化报价
  • 修改仪表盘WordPress网站seo关键词排名
  • 建设银行平潭招聘网站网站快速优化排名app
  • 做交友网站赚钱吗网络营销推广的总结
  • 中国建筑装饰网 郭金辉seo推广经验
  • 营销网站建设一薇今日国际军事新闻头条
  • idstore wordpress郑州seo外包服务
  • 个人静态网站首页怎么做百度账号找回
  • 网上做图赚钱网站seo顾问服务
  • 政务网站开发协议营销软文500字范文
  • 网站架构分析怎么写石家庄百度seo代理
  • 湖南省住房和城乡建设部网站快速网站排名提升工具