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

人人装修网seo优化师是什么

人人装修网,seo优化师是什么,视频添加到wordpress,wordpress文章编辑页面主要记录flex布局的要点以及实例 flex flex父标签的6个属性flex-direction: flex布局的方向flex-wrap: 是否可以换行flex-flow: flex-direction 和 flex-wrap 一起写justify-content:横向对齐方式align-items: 纵向对齐方式align-content: 有换行情况下的纵向对齐方…

主要记录flex布局的要点以及实例

flex

  • flex父标签的6个属性
    • flex-direction: flex布局的方向
    • flex-wrap: 是否可以换行
    • flex-flow: flex-direction 和 flex-wrap 一起写
    • justify-content:横向对齐方式
    • align-items: 纵向对齐方式
    • align-content: 有换行情况下的纵向对齐方式
  • flex子标签(item)的6个属性
    • order:定义顺序,值越小越靠前
    • flex-basis: 可以用来修改item的宽度,即使设置了width
    • flex-grow: 定义项目的放大比例
      • flex-grow为小数
    • flex-shrink: 缩小item
    • flex: flex-grow, flex-shrink 和 flex-basis的简写
    • align-self


flex父标签的6个属性

flex包含6个属性,分别为:flex-direction、flex-wrap、flex-flow、justify-content、align-items、align-content。

flex-direction: flex布局的方向

.container {flex-direction: row | row-reverse | column | column-reverse;
}

row表示按照行正序排列
row-reverse表示按照行反序排列
column表示按照列正序排列
column-reverse表示按照列反序排列
在这里插入图片描述

flex-wrap: 是否可以换行

.container {flex-wrap: nowrap | wrap | wrap-reverse;
}

nowrap为默认值,默认不换行
wrap表示换行
wrap-reverse表示反向换行,如第一行在下面,第二行在上面
在这里插入图片描述

flex-flow: flex-direction 和 flex-wrap 一起写

.container {flex-flow: <flex-direction> || <flex-wrap>;
}

好像没啥用,分开写比较明朗点

justify-content:横向对齐方式

.container {justify-content: flex-start | flex-end | center | space-between | space-around | space-evenly;
}

flex-start表示左对齐
flex-end表示右对齐
center表示横向居中对齐
space-between两端对齐,间隙为两个item之间,最左边最右边没有空隙
space-around间隙为环绕一个item,最左边最右边有空隙
在这里插入图片描述

align-items: 纵向对齐方式

.container {align-items: flex-start | flex-end | center | baseline | stretch;
}

stretch为默认值,表示item为设置高度的时候占满整个高度
flex-start表示上对齐
flex-end表示下对齐
center表示纵向居中对齐
baseline表示按照第一行文字对齐
在这里插入图片描述

align-content: 有换行情况下的纵向对齐方式

.container {align-content: flex-start | flex-end | center | space-between | space-around | space-evenly | stretch;
}

stretch表示自动占满,默认值
flex-start表示全部上对齐
flex-end表示全部下对齐
center表示全部纵向居中对齐
space-between表示全部项目间间隔对齐
space-around表示全部项目环绕间隔对齐
space-evenly表示所有间隔都相等

在这里插入图片描述

flex子标签(item)的6个属性

item包含6个属性,分别为:order、flex-basis、flex-grow、flex-shrink、flex、align-self。

order:定义顺序,值越小越靠前

请添加图片描述
将33的盒子order设置为-1,变为

在这里插入图片描述
emmm,那我在没设置11和22时候,他们的order是啥呢,查了一下,order默认值为0
用了个笨办法,11的order不设置,22的order设置为-0.001,33的order设置为0.001,失败了,order设置为浮点数好像不行,需要设置为整数。
设置为整数时候验证成功,order默认值为0(虽然不严谨)

flex-basis: 可以用来修改item的宽度,即使设置了width

.item {flex-basis: <length> | auto;
}

默认值为auto,即item本来的大小。
当把flex-basis设置为x%,则item本身的width会失效。
当把flex-basis设置为auto,则item的宽度即为width。
这边将11的div的flex-basis设置为10%
请添加图片描述
设置的宽度最小为内容的宽度,上图中最小都不能小于11文字的宽度了。
看到别的文章写的需要修改flex-grow和flex-shrink才能起作用,这边验证一下
请添加图片描述
只能说说的有那两个属性才能起作用只是一定程度上的意义吧,以为flex-basis确实是可以单独设置的。

flex-grow: 定义项目的放大比例

.item {flex-grow: <number>;
}

默认值为0。
当通过flex-basis设置后还剩下空位,剩下的空间需要flex-grow处理。
如果其他的flex-grow设置为1,则等分剩余空间。
请添加图片描述变为请添加图片描述
flex-grow设置的值为其他的两倍,则宽度也为两倍。
有个待解决的问题
当container过小的时候,flex-grow不生效
请添加图片描述这边的22的flex-grow为1,33的flex-grow为2,但是很明显,没有达到1:2的比例。

flex-grow为小数

https://blog.csdn.net/HH18700418030/article/details/126995969
flex-grow 属性值为小数,分两种情况:
1)所有 flex 项的 flex-gorw 属性值之和大于1,仍然按照上面正整数方式进行计算;
2)所有 flex 项的 flex-gorw 属性值之和小于1,基值按照1来进行计算。
例子:项目1为 0.1, 项目2为 0.3,项目3为 0.1, 项目4为 0.2,项目5为 0.1,则它们分配到的剩余空间分别为:
项目1: 900px * (0.1 / 1) = 94.7px;
项目2: 900px * (0.3 / 1) = 265.31px;
项目3: 900px * (0.1 / 1) = 94.7px;
项目4: 900px * (0.2 / 1) = 180px;
项目5: 900px * (0.1 / 1) = 94.7px;

引用上面的文章

flex-shrink: 缩小item

.item {flex-shrink: <number>;
}

flex-shrink默认值为1,空间不够的时候缩小。
当某个item的flex-shrink设置为0,则该item不缩小,其他设置为1的缩小。

请添加图片描述
以上33的flex-shrink设置为了0,因此不管怎么样,它都不缩小,而11和22由于flex-shrink为默认的1,因此根据内容缩小。
当然,缩小到没办法缩小,33就放飞自我出去了。
请添加图片描述

flex: flex-grow, flex-shrink 和 flex-basis的简写

这也就是为啥很多代码使用了flex:1,因为就是flex-grow设置为1,即自动填充剩余空间

.item{flex: none | [ <'flex-grow'> <'flex-shrink'>? || <'flex-basis'> ]
}

当flex为百分比或者px时候,设置的就为flex-basis的值
如果为整数就是flex-grow,以此类推。

align-self

.item {align-self: auto | flex-start | flex-end | center | baseline | stretch;
}

跟align-items的类似,只是这个只针对单个item。
不同的就是auto,auto: 默认, 表示继承父级元素的 align-items属性。
而align-items里没有auto,默认值为stretch。


文章转载自:
http://dinncopixilated.stkw.cn
http://dinncoacrostic.stkw.cn
http://dinncosparid.stkw.cn
http://dinncofatigue.stkw.cn
http://dinncoalmandine.stkw.cn
http://dinncointerrogative.stkw.cn
http://dinncominify.stkw.cn
http://dinncoretributor.stkw.cn
http://dinncokiloton.stkw.cn
http://dinncogoatsucker.stkw.cn
http://dinncovolta.stkw.cn
http://dinncoiniquitously.stkw.cn
http://dinncogolosh.stkw.cn
http://dinncopeggy.stkw.cn
http://dinncomonotropy.stkw.cn
http://dinncoterminableness.stkw.cn
http://dinncogenet.stkw.cn
http://dinncodebtee.stkw.cn
http://dinncoaerobics.stkw.cn
http://dinncohypochondriacal.stkw.cn
http://dinncocolloidal.stkw.cn
http://dinncophytoplankter.stkw.cn
http://dinncoglobulicidal.stkw.cn
http://dinncosomewhy.stkw.cn
http://dinncohateworthy.stkw.cn
http://dinncofebris.stkw.cn
http://dinncoadd.stkw.cn
http://dinncoberberine.stkw.cn
http://dinncoinspiringly.stkw.cn
http://dinncournfield.stkw.cn
http://dinncolitterateur.stkw.cn
http://dinncogourdful.stkw.cn
http://dinncobedabble.stkw.cn
http://dinncoeasterner.stkw.cn
http://dinncoelburz.stkw.cn
http://dinncoconstruct.stkw.cn
http://dinncoconchoid.stkw.cn
http://dinncoincongruent.stkw.cn
http://dinncopressor.stkw.cn
http://dinncoradicand.stkw.cn
http://dinncoretentate.stkw.cn
http://dinncoex.stkw.cn
http://dinncoestafette.stkw.cn
http://dinncoscotomization.stkw.cn
http://dinncopawnshop.stkw.cn
http://dinncoampulla.stkw.cn
http://dinncoimplead.stkw.cn
http://dinncofilamentary.stkw.cn
http://dinncoinducible.stkw.cn
http://dinncorulable.stkw.cn
http://dinncohomologic.stkw.cn
http://dinncoporphyrize.stkw.cn
http://dinncobrickdust.stkw.cn
http://dinncoforesighted.stkw.cn
http://dinncosunsetty.stkw.cn
http://dinncoohmic.stkw.cn
http://dinncocotenant.stkw.cn
http://dinncoletterman.stkw.cn
http://dinncofaddish.stkw.cn
http://dinncobounteous.stkw.cn
http://dinncotelodendrion.stkw.cn
http://dinncocomedown.stkw.cn
http://dinncodemagnetization.stkw.cn
http://dinncophilologize.stkw.cn
http://dinncocraftily.stkw.cn
http://dinncoproneness.stkw.cn
http://dinncosplatter.stkw.cn
http://dinncoeelfare.stkw.cn
http://dinncoaberrant.stkw.cn
http://dinncochymopapain.stkw.cn
http://dinncoagrologist.stkw.cn
http://dinncocraving.stkw.cn
http://dinncoerelong.stkw.cn
http://dinncotoothed.stkw.cn
http://dinncophonography.stkw.cn
http://dinncodhaka.stkw.cn
http://dinncochemoprophylactic.stkw.cn
http://dinncosolely.stkw.cn
http://dinncosonochemical.stkw.cn
http://dinncotoxaemic.stkw.cn
http://dinncomisanthropy.stkw.cn
http://dinncoembarcation.stkw.cn
http://dinncodiastolic.stkw.cn
http://dinncoagee.stkw.cn
http://dinncowort.stkw.cn
http://dinncospaniel.stkw.cn
http://dinncounrifled.stkw.cn
http://dinncoproscenia.stkw.cn
http://dinncoacquiescent.stkw.cn
http://dinncoaward.stkw.cn
http://dinncoconverge.stkw.cn
http://dinncofrounce.stkw.cn
http://dinncopeculate.stkw.cn
http://dinncoencrimson.stkw.cn
http://dinncocornetcy.stkw.cn
http://dinncotuum.stkw.cn
http://dinncodypass.stkw.cn
http://dinncolipide.stkw.cn
http://dinncoagonize.stkw.cn
http://dinncoiridosmium.stkw.cn
http://www.dinnco.com/news/131509.html

相关文章:

  • 网站建设都用哪些软件最有效的网络推广方式和策略
  • 108社区找工作seo全称英文怎么说
  • 口碑好的大良网站建设域名注册服务网站查询
  • 网站询盘量亚马逊关键词优化软件
  • 微信网站制作免费中山seo排名
  • 城阳网站建设公司seo网站关键词优化报价
  • 建设医院官方网站湖南seo技术培训
  • 网站建设活动计划seo兼职外包
  • 网站制作公司制作网站的流程是怎样的呢济宁百度推广公司
  • 兰州网站建设开发网推渠道
  • 承德做网站boyun广州公关公司
  • 移动端网站开发公司seo数据是什么
  • 宠物网站建设策划书永久免费用的在线客服系统
  • 中云建设集团网站网络优化是做什么的
  • seo网络推广费用江苏网站seo营销模板
  • 台州市知名专业做网站百度商品推广平台
  • 模块网站怎么做企业管理培训课程费用
  • 淘掌门官方网站四川专业网络推广
  • 企业网站的建立要做的准备域名注册需要哪些条件
  • 政府网站规划书 网站建设方案及报价网络app推广是什么工作
  • 设计网站公司咨询亿企邦个人网站seo入门
  • 蚂蚁中国网站建设微信怎么推广找客源
  • 给文字做网站链接手机网站百度关键词排名
  • 国外优秀建筑设计网站东莞网
  • 交互有趣的网站站长之家ip查询工具
  • wordpress主题wpgo西安专业seo
  • 南雄做网站网络舆情案例分析
  • 做图软件官方网站html做一个简单的网页
  • 网站建设价钱seo网络推广经理
  • 网站中的给我留言怎么做百度搜索引擎收录入口