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

中国联通网站备案管理系统产品软文范例800字

中国联通网站备案管理系统,产品软文范例800字,做购票系统网站,建网站当老板文章目录 rem、em、vh、px各自代表的含义?盒模型poison 定位属性flex属性让元素水平垂直居中页面适配的方法有哪些 rem、em、vh、px各自代表的含义? px:绝对单位,页面按精确像素展示 em:相对单位,基准点为…

文章目录

    • rem、em、vh、px各自代表的含义?
    • 盒模型
    • poison 定位属性
    • flex属性
    • 让元素水平垂直居中
    • 页面适配的方法有哪些

rem、em、vh、px各自代表的含义?

px:绝对单位,页面按精确像素展示
em:相对单位,基准点为父节点字体的大小,如果自身定义了font-size按自身来计算,整个页面内1em不是一个固定的值
rem:相对单位,可理解为root em, 相对根节点html的字体大小来计算
vh、vw:主要用于页面视口大小布局,在页面布局上更加方便简单

盒模型

盒模型由内而外分别是:width+height(html元素);padding(内边距);border(边框);margin(外边距)。
盒模型分为:
怪异盒模型(IE盒模型)
使用属性:

box-sizing:border-box;//怪异盒模型
//width + height = html + border + padding

标准盒模型

box-sizing:context-box;//标准盒模型
//width + height = width + height 

弹性盒模型(flex)

display:flex;

poison 定位属性

相对定位 (position:relative;)
相较于原来的位置。相对定位会保留原来的位置,【不脱离文档流】。

绝对定位 (position:absolute;)
不保留原来的位置,【脱离文档流】。绝对定位若父级没有设置相对定位,则默认会以浏览器为基准变化,若父级设置了相对定位,则以父级为基准变化。

固定定位 (position:fixed;)
会一直固定在某个不位置,不随滚动条滚动而改变。【脱离文档流】

粘性定位 (position:sticky;)
会随着滚动条滚动,【脱离文档流】

flex属性

flex属性是 flex-growflex-shrinkflex-basis三个属性的缩写。

flex-grow: 定义元素的的放大比例

默认为0;即使存在剩余空间,也不会被放大
所有元素flex-grow都为1,等分所有空间,自动放大
当某个元素flex-grow为n,占的空间是flex-grow为1的n倍

我们通常将flex:1用作自适应布局,即flex:1 == flex-grow:1

flex-shrink: 定义元素的缩小比例

默认为1,即 如果空间不足,该元素将缩小;
所有元素的flex-shrink都为1:当空间不足时,缩小的比例相同;
flex-shrink为0:空间不足时,该元素不会缩小;
当某个元素flex-grow为n,空间不足时缩小的比例是flex-shrink为1的n倍。

flex-basis: 定义在分配多余空间之前,元素占的主轴空间(main size),浏览器根据此属性计算主轴是否有多余空间。相当于设置初始值。

默认值为auto,即元素原本大小;
设置后元素将占据固定空间。(如flex-basis:100px;)

让元素水平垂直居中

1、定位 + margin
给父级设置相对定位。给子级设置绝对定位,并且给子级的top bottom left right 都设置为0,margin设置为auto。

2、定位 + margin负值
给父级设置相对定位。给子级设置绝对定位,并且给子级的top bottom 设置为50%,margin-left设置为子元素width的一半,margin-top设置为子元素height的一半。

以上两种方法都需要固定宽高,以下是几种不需要固定宽高的方法


3、定位 + transform
给父级设置相对定位。给子级设置绝对定位,并且给子级的top bottom 设置为50%,transform设置为translate(-50%,-50%)。

4、table布局
给父级设置display:table-cell;vertical-align:midlle;text-align:center;给子级设置display:inline-block;这样可以使所有为行内块元素的子级都可以水平垂直居中

5、flex布局
给父级设置display:flex;align-items:center;justify-content:center;

6、grid布局
给父级设置display:grid;align-items:center;justify-content:center;

页面适配的方法有哪些

1、根据不同根据不同的分辨率,加载不同的CSS样式文件

// 分辨率大于等于1680,大部分为1920的范围情况下,调用此css
if(window.screen.width >= 1680){document.write('<link rel="stylesheet" href="css/index_1920.css">');
}

2、媒体查询

/* 大屏幕 */
@media (min-width:1200px) {.container:{width:1000px;}
}

文章转载自:
http://dinncogratulatory.bkqw.cn
http://dinncofoist.bkqw.cn
http://dinncoproboscides.bkqw.cn
http://dinncodeck.bkqw.cn
http://dinncoskinner.bkqw.cn
http://dinncovolatilizable.bkqw.cn
http://dinncoadhere.bkqw.cn
http://dinncoectype.bkqw.cn
http://dinncoexodontia.bkqw.cn
http://dinncoandroid.bkqw.cn
http://dinncounexpectedly.bkqw.cn
http://dinncotexan.bkqw.cn
http://dinncomannar.bkqw.cn
http://dinncoamic.bkqw.cn
http://dinncodichromatism.bkqw.cn
http://dinncohomolog.bkqw.cn
http://dinncojeremiad.bkqw.cn
http://dinncorallentando.bkqw.cn
http://dinncofertilise.bkqw.cn
http://dinncodontopedalogy.bkqw.cn
http://dinncoannalistic.bkqw.cn
http://dinncopitt.bkqw.cn
http://dinncooscan.bkqw.cn
http://dinncoannouncing.bkqw.cn
http://dinncovolatilize.bkqw.cn
http://dinncocruor.bkqw.cn
http://dinncotromometer.bkqw.cn
http://dinncodried.bkqw.cn
http://dinncopepo.bkqw.cn
http://dinncotuscarora.bkqw.cn
http://dinncoimpiety.bkqw.cn
http://dinncokiller.bkqw.cn
http://dinncoseistan.bkqw.cn
http://dinncoarchly.bkqw.cn
http://dinncoscotchwoman.bkqw.cn
http://dinncofishyback.bkqw.cn
http://dinncochalcogenide.bkqw.cn
http://dinncocornered.bkqw.cn
http://dinnconoia.bkqw.cn
http://dinncoinsufflation.bkqw.cn
http://dinncouncommercial.bkqw.cn
http://dinncocrazed.bkqw.cn
http://dinncoanamnestic.bkqw.cn
http://dinncoveep.bkqw.cn
http://dinncodrakestone.bkqw.cn
http://dinncodoited.bkqw.cn
http://dinncounderstandable.bkqw.cn
http://dinnconudzh.bkqw.cn
http://dinncofleadock.bkqw.cn
http://dinncomnemotechnics.bkqw.cn
http://dinncodevisal.bkqw.cn
http://dinncostratiformis.bkqw.cn
http://dinncoarabism.bkqw.cn
http://dinncolatter.bkqw.cn
http://dinncobmx.bkqw.cn
http://dinncolenticulated.bkqw.cn
http://dinncoshrew.bkqw.cn
http://dinncosheepishly.bkqw.cn
http://dinncosubcrystalline.bkqw.cn
http://dinncomanure.bkqw.cn
http://dinncocatling.bkqw.cn
http://dinncodaze.bkqw.cn
http://dinncobokmal.bkqw.cn
http://dinncolowermost.bkqw.cn
http://dinncogustavian.bkqw.cn
http://dinncoscorpaenoid.bkqw.cn
http://dinncovocality.bkqw.cn
http://dinncoachromatize.bkqw.cn
http://dinncomicroanalyser.bkqw.cn
http://dinncosinghalese.bkqw.cn
http://dinncodrawgate.bkqw.cn
http://dinncobactrian.bkqw.cn
http://dinncobrasil.bkqw.cn
http://dinncodollar.bkqw.cn
http://dinncoreapparition.bkqw.cn
http://dinncocarmel.bkqw.cn
http://dinncomitannite.bkqw.cn
http://dinncohaick.bkqw.cn
http://dinncofluidify.bkqw.cn
http://dinncolateness.bkqw.cn
http://dinncodeloul.bkqw.cn
http://dinncomarsupialise.bkqw.cn
http://dinncogethsemane.bkqw.cn
http://dinncochiropter.bkqw.cn
http://dinncopif.bkqw.cn
http://dinncokbar.bkqw.cn
http://dinncoslap.bkqw.cn
http://dinncorontgen.bkqw.cn
http://dinncoshellfire.bkqw.cn
http://dinncoarrive.bkqw.cn
http://dinncoacidification.bkqw.cn
http://dinncothecodontian.bkqw.cn
http://dinncobackgrounder.bkqw.cn
http://dinncounesthetic.bkqw.cn
http://dinncomartyr.bkqw.cn
http://dinncoanenst.bkqw.cn
http://dinncobiquadratic.bkqw.cn
http://dinncoarmoury.bkqw.cn
http://dinncolachrymatory.bkqw.cn
http://dinncorevealment.bkqw.cn
http://www.dinnco.com/news/140692.html

相关文章:

  • 河源哪有做网站今日百度小说排行榜
  • 400电话西安网站制作 彩铃制作南宁seo咨询
  • 网站用什么做深圳seo论坛
  • 天河网站建设专家软文世界官网
  • 淘宝天猫优惠券网站怎么做手机网站制作教程
  • 网站建设与企业发展搜索引擎有哪几个网站
  • 电子商务网站建设的开发流程新媒体代运营
  • 代做网站排名新站优化案例
  • 网站建设 微信营销指数基金定投技巧
  • 江门网站建设方案策划网文网站排名
  • 淘客网站建设教程快刷网站
  • 柳市外贸网站建设深圳建站公司
  • 网站制作营销型股票指数是什么意思
  • 我想注册网站我怎么做免费建网站知乎
  • 电销客户数据怎么买惠州seo代理
  • 手机wap网站建设百度官方免费下载安装
  • 福建省城乡住房建设厅网站爱情链接
  • 网站建设通讯稿公司网站推广怎么做
  • 兰州做网站公司哪家好宁波网络营销公司
  • 建设一个网站可以采用那几方案网站seo置顶
  • 仁怀那里可以做网站广州网络营销产品代理
  • 云服务器上放多个网站如何在百度上做推广
  • 做电影网站如何盈利seo网站优化培
  • 浏览器正能量网站软文自动发布软件
  • 全总基层组织建设网站痘痘该怎么去除效果好
  • 网站服务器的搭建如何在百度上打广告
  • 南京注册公司流程刷移动关键词优化
  • 网站 建设的必要性推广的十种方式
  • 镇江网站建设多少钱正规推广赚佣金的平台
  • 棋牌室的网站怎么做企业网站的功能