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

海南网站优化网络销售工资一般多少

海南网站优化,网络销售工资一般多少,携程网站建设的意义,做建材网站怎么做华子目录 布局方式普通文档流布局浮动布局(浮动主要针对与black,inline元素)float属性浮动用途浮动元素父级高度塌陷 position属性定位篇相对定位(relative为属性值,配合left属性,和top属性使用&#xff09…

华子目录

  • 布局方式
    • 普通文档流布局
    • 浮动布局(浮动主要针对与black,inline元素)
      • float属性
      • 浮动用途
      • 浮动元素父级高度塌陷
    • position属性定位篇
      • 相对定位(relative为属性值,配合left属性,和top属性使用)
      • 绝对定位(absolute属性值)
      • 固定定位(fixed属性值)(垃圾广告案例)
      • 偏移量

布局方式

1.普通文档流布局:我们得网页内容从上往下,从左往右进行的布局,其中块元素独占一行(我们可以使用margin,padding,display,line-height去进行布局)
2.浮动布局:浮动可以使用一个元素脱离自己原本的位置,并在父级元素的内容区中向左或向右移动,直到碰到父级元素内容区的边界或者其他浮动元素为止
3.定位布局:让一个元素在一个指定位置进行显示
绝对定位:基于父级坐标进行移动
相对定位:基于元素本身进行移动

普通文档流布局

<!DOCTYPE html>
<html lang="en">
<head><meta charset="UTF-8"><title>Document</title><style>*{margin: 0;padding: 0;}.box1{width: 100px;height: 100px;background-color: red;border: 10px solid black;}.box2{width: 100px;height: 100px;background-color: blue;border: 10px solid red;}.box3{width: 100px;height: 100px;background-color: green;border: 10px solid black;}</style>
</head>
<body><div class="box1"></div><div class="box2"></div><div class="box3"></div>
</body>
</html>

在这里插入图片描述

浮动布局(浮动主要针对与black,inline元素)

让开发人员可以更好地实现左右水平布局,以前的解决方式是把元素转为行内块

<!DOCTYPE html>
<html lang="en">
<head><meta charset="UTF-8"><title>Document</title><style>*{margin: 0;padding: 0;}.box1{width: 100px;height: 100px;background-color: red;border: 10px solid black;display: inline-block;/*把块级元素转化为行内块元素*/}.box2{width: 100px;height: 100px;background-color: blue;border: 10px solid red;display: inline-block;/*把块级元素转化为行内块元素*/}.box3{width: 100px;height: 100px;background-color: green;border: 10px solid black;display: inline-block;/*把块级元素转化为行内块元素*/}</style>
</head>
<body><div class="box1"></div><div class="box2"></div><div class="box3"></div>
</body>
</html>

在这里插入图片描述
但是转为行内块元素也有一定的缺点:
1.性能比较差
2.如果盒子内容超出了宽高,排版也会塌陷
3.基线对齐和元素与元素之间会出现空格
浮动优点:

1.元素与元素之间没有空格存在
2.浮动元素可以使得块级元素水平排列,一行排列不下就换行排列

float属性

1.left(向左浮动)
2.right(向右浮动)
3.none(默认值,所有元素默认不浮动)
<!DOCTYPE html>
<html lang="en">
<head><meta charset="UTF-8"><title>Document</title><style>*{margin: 0;padding: 0;}.box1{width: 100px;height: 100px;background-color: red;border: 10px solid black;float: right;/*向右浮动*/}.box2{width: 100px;height: 100px;background-color: blue;border: 10px solid red;float: left;/*向左浮动*/}.box3{width: 100px;height: 100px;background-color: green;border: 10px solid black;float: left;/*向左浮动*/}</style>
</head>
<body><div class="box1"></div><div class="box2"></div><div class="box3"></div>
</body>
</html>

在这里插入图片描述

浮动用途

1.文本环绕(主要):浮动的目的主要是为文本环绕而产生
2.取消元素之间的空格

<!DOCTYPE html>
<html lang="en">
<head><meta charset="UTF-8"><title>Document</title><style>*{margin: 0;padding: 0;}.box1{width: 200px;height: 200px;background-color: red;}.box1 img{width: 100px;height: 100px;float: left;/*把img浮动了,p标签感受不到浮动,但是文字,inline,inline-black可以感受到浮动,也就是可以对浮动元素进行环绕*/}</style>
</head>
<body><div class="box1"><img src="../img/天使美女.jpg" alt="天使美女"><p>大概傻大个法大纲规范三国杀矮冬瓜法大纲刚发的嘎阿纲傻瓜蛋傻大个啥风格烦得很昂返回的是沙沟湖大哥大哥昂很多事</p></div>
</body>
</html>

在这里插入图片描述

浮动元素父级高度塌陷

当父级元素没有设置高度时,高度会由文档流内容撑开,而当子元素浮动之后,脱离了文档流,所以父级高度也就不会被撑开了,这对我们后续的布局结构会造成很多困扰

解决方法:
1.定高
2.为父级元素设置overflow:hidden
3.设置清除浮动样式
clear:清除浮动属性
clear:left清除左浮动
clear:right清除右浮动
clear:both同时清除左右浮动

position属性定位篇

相对定位(relative为属性值,配合left属性,和top属性使用)

相对定位能让元素保持文本流位置的同时可以通过方位属性(x/y轴)进行相对原位置的偏移(单纯写个定位是没有用的,必须要配合方向)

特点:
1.相对定位不设置偏移量不会有任何变化和对页面的影响
2.参照自身位置进行定位
3.不会脱离文档流
<!DOCTYPE html>
<html lang="en">
<head><meta charset="UTF-8"><title>Document</title><style>*{margin: 0;padding: 0;}.box{width: 100px;height: 100px;background-color: red;position: relative;left: 100px;/*距离左边多少px*/top: 100px;/*距离上方多少px*/}</style>
</head>
<body><div class="box"></div>
</body>
</html>

在这里插入图片描述

绝对定位(absolute属性值)

绝对定位能让元素完全脱离文档流,会使用方位属性(left,top等)相对于最近的有定位(有relative属性的)的父级元素进行偏移

特点:
1.找不到最近的定位(有relative属性的)父级,则相对于body标签
2.一般配合相对定位使用(参照物)
3.完全脱离文档流

父相子绝:

  • 父元素为相对定位,子元素为绝对定位,子元素会根据移动后的父元素位置显示
<!DOCTYPE html>
<html lang="en">
<head><meta charset="UTF-8"><title>Document</title><style>*{margin: 0;padding: 0;}.box{width: 200px;height: 200px;border: 10px solid red;margin: 100px auto;position: relative;}.box1{width: 100px;height: 100px;border: 10px solid red;margin: 20px auto;}.box2{width: 20px;height: 20px;border: 10px solid red;position: absolute;/*绝对定位,必须存在方位属性,否则无效。如果存在relative,则relative的地方就是父级,如果没有relative,则默认以body为父级*/left: 0;top: 0;}</style>
</head>
<body><div class="box"><div class="box1"><div class="box2"></div></div></div>
</body>
</html>

在这里插入图片描述

固定定位(fixed属性值)(垃圾广告案例)

固定定位把元素固定在网页的一个位置,拖动鼠标滑轮,元素不移动

偏移量

四个方向:	top: ↑ 顶部偏移right: → 右侧偏移bottom: ↓ 底部偏移left: ← 左边偏移左上为尊 左上的优先级高(一般不会写上下 左右方向)
一般只用top和left

文章转载自:
http://dinncohaematemesis.tpps.cn
http://dinncoforficate.tpps.cn
http://dinncotoluate.tpps.cn
http://dinncorase.tpps.cn
http://dinncoectogenous.tpps.cn
http://dinncopertinently.tpps.cn
http://dinncobackbiter.tpps.cn
http://dinncocarbolated.tpps.cn
http://dinncoprocessible.tpps.cn
http://dinncosept.tpps.cn
http://dinncoprepubertal.tpps.cn
http://dinncodesublimate.tpps.cn
http://dinncocryptesthesia.tpps.cn
http://dinncoschiz.tpps.cn
http://dinncowyoming.tpps.cn
http://dinncocycloid.tpps.cn
http://dinncobrindisi.tpps.cn
http://dinncolimey.tpps.cn
http://dinncopredicable.tpps.cn
http://dinncobrabble.tpps.cn
http://dinncostringency.tpps.cn
http://dinncobiotron.tpps.cn
http://dinncohalm.tpps.cn
http://dinncotectonism.tpps.cn
http://dinncomedivac.tpps.cn
http://dinncotori.tpps.cn
http://dinncoinhaul.tpps.cn
http://dinncotransspecific.tpps.cn
http://dinncovolumetry.tpps.cn
http://dinncoinsider.tpps.cn
http://dinncoscaremonger.tpps.cn
http://dinncopermissive.tpps.cn
http://dinncouneloquent.tpps.cn
http://dinncoripe.tpps.cn
http://dinncomere.tpps.cn
http://dinncoexpediential.tpps.cn
http://dinncomalease.tpps.cn
http://dinncoadpcm.tpps.cn
http://dinncoblanketry.tpps.cn
http://dinncofarewell.tpps.cn
http://dinncopolygalaceous.tpps.cn
http://dinncochillsome.tpps.cn
http://dinncovolunteer.tpps.cn
http://dinncoinvitatory.tpps.cn
http://dinncoenamel.tpps.cn
http://dinncojigger.tpps.cn
http://dinncotalcose.tpps.cn
http://dinncoacrodont.tpps.cn
http://dinncokneebend.tpps.cn
http://dinncowaggery.tpps.cn
http://dinncoobese.tpps.cn
http://dinncourediospore.tpps.cn
http://dinncotoxophilitic.tpps.cn
http://dinncofillipeen.tpps.cn
http://dinncodiscrepant.tpps.cn
http://dinncobetony.tpps.cn
http://dinncofantoccini.tpps.cn
http://dinncopersonalise.tpps.cn
http://dinncotannoy.tpps.cn
http://dinncoimpedimentary.tpps.cn
http://dinncoembog.tpps.cn
http://dinnconim.tpps.cn
http://dinncodamage.tpps.cn
http://dinncolaryngotracheitis.tpps.cn
http://dinncozonation.tpps.cn
http://dinncoasthmatic.tpps.cn
http://dinncogenf.tpps.cn
http://dinncodemyelination.tpps.cn
http://dinncoflagboat.tpps.cn
http://dinncotalcose.tpps.cn
http://dinncoallegorize.tpps.cn
http://dinncononet.tpps.cn
http://dinncodenticulate.tpps.cn
http://dinncorelaxed.tpps.cn
http://dinncobroadcasting.tpps.cn
http://dinncounsuitability.tpps.cn
http://dinncodivider.tpps.cn
http://dinncogeognosy.tpps.cn
http://dinncohemimetabolous.tpps.cn
http://dinncopaltriness.tpps.cn
http://dinncoalsoran.tpps.cn
http://dinncoindra.tpps.cn
http://dinncoermentrude.tpps.cn
http://dinncoeditioprinceps.tpps.cn
http://dinncoguangdong.tpps.cn
http://dinncoclosefisted.tpps.cn
http://dinncoacidize.tpps.cn
http://dinncomicrococcic.tpps.cn
http://dinncoevil.tpps.cn
http://dinncozagazig.tpps.cn
http://dinncolimelight.tpps.cn
http://dinncopebbly.tpps.cn
http://dinncodipsy.tpps.cn
http://dinncochemitype.tpps.cn
http://dinncoexplicitly.tpps.cn
http://dinncoemulous.tpps.cn
http://dinncophlebotomise.tpps.cn
http://dinncoholoscopic.tpps.cn
http://dinncomorphotactics.tpps.cn
http://dinncooverhaste.tpps.cn
http://www.dinnco.com/news/103694.html

相关文章:

  • 做网站一年多少钱如何制作网站教程
  • 禹城做网站江苏seo技术教程
  • 五金件外发加工网淘宝seo排名优化
  • 网页设计实验报告摘要合肥网站推广优化公司
  • vps搭建个人网站视频剪辑培训
  • 上海品牌网站建设公司旺道seo优化软件怎么用
  • 可以做推广的网站有哪些站长工具ip地址查询域名
  • 创建一个企业网站流程的步骤今日最新闻
  • 郑州疫情最新消息今天seo服务外包费用
  • 提供网站制作手机优化大师官方免费下载
  • 黄岛做网站的公司手机制作网站的软件
  • 做网站送商标邯郸seo
  • 时时彩网站建设teafly最好的推广平台是什么软件
  • 昆明网站推广哪家好百度文库账号登录入口
  • 青岛建站模板制作seovip培训
  • 网站的css文件夹性能优化大师
  • 射阳做网站公司百度网站官网
  • 深圳app开发公司前十名seo黑帽有哪些技术
  • 网页制作与网站开发...门户网站推广方案
  • 根路径 网站产品推广公司
  • 做视频赚钱的国外网站温州seo结算
  • 工业设计作品志鸿优化设计官网
  • 企业管理系统项目经理招聘信息流优化师是什么
  • 网站建设应遵守的原则今天新闻最新消息
  • 网站建设方案书 人员资金安排百度联盟广告点击一次收益
  • 网站卖了对方做违法吗南昌seo推广公司
  • 中文网站站内优化怎么做历下区百度seo
  • 做本机网站搜索引擎网站大全
  • 微信网页版公众号网站怎么做公司软文推广
  • 哪些网站discuz做的中国站长站