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

连云港网站建设富阳做网站公司

连云港网站建设,富阳做网站公司,中国建设银行个人登录入口,学什么可以做推广网站简单概述 为元素添加 display:flex; 的属性后#xff0c;当前元素被视为弹性布局的盒子容器(box)#xff0c;其子元素被视为弹性布局项目(item)。item 会在 box 内灵活布局#xff0c;解决了对齐、分布、尺寸等响应式问题。 演示 demo templatediv class 的属性后当前元素被视为弹性布局的盒子容器(box)其子元素被视为弹性布局项目(item)。item 会在 box 内灵活布局解决了对齐、分布、尺寸等响应式问题。 演示 demo templatediv classmainBoxdiv classboxdivv-for(item, index) in data:keyindexclassitem:style{background: item.background, height: item.height, width: item.width,}{{ item.msg }}/div/div/div /template script export default {data() {return {data: [{ msg: 111, background: #3E445E, width: 100px, height: 50px, },{ msg: 222, background: #D0D3DA, width: 100px, height: 60px, },{ msg: 333, background: #505A9B, width: 100px, height: 70px, },{ msg: 444, background: #7394CD, width: 100px, height: 80px, },{ msg: 555, background: #F1E2D0, width: 100px, height: 90px, },{ msg: 666, background: #F6CFA3, width: 100px, height: 100px, },{ msg: 777, background: #E18792, width: 100px, height: 110px, },{ msg: 888, background: #907AC3, width: 100px, height: 120px, },],};}, }; /script style langless scoped .mainBox {width: 100%;height: 100%; } .box {display: flex;padding: 40px;border: 1px solid #333;.item {color: #fff;} } /style下述属性演示都在以上代码的基础上进行 用于盒子容器(box)的属性 flex-direction 设置 box 内弹性 item 的方向取值row / row-reverse / column / column-reverseflex-direction: row; 行模式-从左到右排列默认值.box {display: flex;padding: 40px;border: 1px solid #333;flex-direction: row; }flex-direction: row-reverse; 行模式-从右到左排列.box {display: flex;padding: 40px;border: 1px solid #333;flex-direction: row-reverse; }flex-direction: column; 列模式-从上到下排列.box {display: flex;padding: 40px;border: 1px solid #333;flex-direction: column; }flex-direction: column-reverse; 列模式-从下到上排列.box {display: flex;padding: 40px;border: 1px solid #333;flex-direction: column-reverse; }flex-wrap 让 box 在必要的时候换行取值nowrap / wrapflex-wrap: nowrap; 不换行默认值.box {display: flex;padding: 40px;border: 1px solid #333;flex-wrap: nowrap; } /* 减小 box 宽度时item 的宽度失效被压缩 */flex-wrap: wrap; 换行.box {display: flex;padding: 40px;border: 1px solid #333;flex-wrap: wrap; } /* 减小 box 宽度时item 的宽度不变不会被压缩自动换行 */justify-content 设置 box 内弹性 item 的对齐分布方式取值flex-start / flex-end / center / space-between / space-around / space-evenly为方便观察不同属性的对比移除了 box 的 padding 属性justify-content: flex-start; 起点对齐默认值.box {display: flex;border: 1px solid #333;justify-content: flex-start; }justify-content: flex-end; 结束点对齐.box {display: flex;border: 1px solid #333;justify-content: flex-end; }justify-content: center; 居中对齐.box {display: flex;border: 1px solid #333;justify-content: center; }justify-content: space-between; 两端对齐.box {display: flex;border: 1px solid #333;justify-content: space-between; }justify-content: space-around; 周围分布-视作 margin 效果的话相当于每个 item 的 margin-left 和 margin-right 值相同.box {display: flex;border: 1px solid #333;justify-content: space-around; } /* margin-right margin-left (box 的宽度 - item 的宽度 * 8) / (8 * 2) */justify-content: space-evenly; 均匀分布-视作 margin 的话均匀分配剩余空间每个 item 的 margin-left 值相等最后剩下的空隙值与 item 的 margin-left 相等.box {display: flex;border: 1px solid #333;justify-content: space-evenly; } /* margin-right 0 */ /* margin-left (box 的宽度 - item 的宽度 * 8) / (8 1) */align-items 设置 box 内弹性 item 的针对交叉轴的对齐分布方式取值flex-start / flex-end / centeralign-items: flex-start; 起点对齐默认值.box {display: flex;padding: 40px;border: 1px solid #333;align-items: flex-start; }align-items: flex-end; 结束点对齐.box {display: flex;padding: 40px;border: 1px solid #333;align-items: flex-end; }align-items: center; 居中对齐.box {display: flex;padding: 40px;border: 1px solid #333;align-items: center; }align-content 设置多轴线 box 内弹性 item 的对齐分布方式 取值flex-start / flex-end / center / space-between / space-around / space-evenly 为方便观察不同属性的对比移除了 box 的 padding 属性 为外层父盒子添加 flex 属性形成多轴线的盒子 align-content: flex-start; 起点对齐 .mainBox {display: flex;.box {display: flex;border: 1px solid #333;flex-wrap: wrap;align-content: flex-start;} }align-content: flex-end; 结束点对齐 .mainBox {display: flex;.box {display: flex;border: 1px solid #333;flex-wrap: wrap;align-content: flex-end;} }align-content: center; 居中对齐 .mainBox {display: flex;.box {display: flex;border: 1px solid #333;flex-wrap: wrap;align-content: center;} }align-content: space-between; 两端对齐 .mainBox {display: flex;.box {display: flex;border: 1px solid #333;flex-wrap: wrap;align-content: space-between;} }align-content: space-around; 周围分布 .mainBox {display: flex;.box {display: flex;border: 1px solid #333;flex-wrap: wrap;align-content: space-around;} }align-content: space-evenly; 均匀分布 .mainBox {display: flex;.box {display: flex;border: 1px solid #333;flex-wrap: wrap;align-content: space-evenly;} }用于弹性项目(item)的属性 order 设置 box 内弹性 item 的排序取值Num取值越小越靠前默认为 0.item {color: #fff;:nth-child(1) {order: 4;}:nth-child(2) {order: 3;}:nth-child(3) {order: 0;}:nth-child(4) { }:nth-child(5) {order: 2;} }flex-grow 设置 box 内弹性 item 的扩展系数取值Num取值越小扩展比例越小默认为 0.item {color: #fff;:nth-child(1) {flex-grow: 1;}:nth-child(2) {flex-grow: 3;}:nth-child(3) {flex-grow: 1;}:nth-child(4) { }:nth-child(5) { } }flex-basis 设置 box 内弹性 item 的初始宽度会覆盖原有宽度属性取值像素值.item {color: #fff;:nth-child(1) {flex-basis: 50px;}:nth-child(2) {flex-basis: 100px;}:nth-child(3) {flex-basis: 150px;}:nth-child(4) {flex-basis: 200px;}:nth-child(5) {flex-basis: 250px;} }flex-shrink 设置 box 内弹性 item 的收缩系数取值Num取值越小压缩比例越小默认为 1 取值为 0 时不会被压缩.item {color: #fff;:nth-child(1) {flex-shrink: 1;}:nth-child(2) {flex-shrink: 2;}:nth-child(3) {flex-shrink: 3;}:nth-child(4) {flex-shrink: 0;}:nth-child(5) {flex-shrink: 0;} }
http://www.hkea.cn/news/14533438/

相关文章:

  • 网站开发技术包括wordpress 域
  • 前端网站开发流程图磁力猫torrent kitty
  • 佛山建网站费用wordpress文章添加关注公众号
  • 上海做网站哪里有免费发广告的软件有哪些
  • 网站里的动效怎么做文成做网站
  • 海南彩票网站开发手机一键生成户型图
  • 医院网站建设策划书长春百度推广哪家好
  • 网站制作流程详解(学做网站第一步)城乡建设部网站房产查询
  • 网站备案幕布照规范品牌网站建设有什么作用
  • 企业网站设计制作价格网站的支付接口对接怎么做
  • 扁平式网站建设南京网站设计开发
  • 举报网站平台浏览器直接进入网站
  • 文登区做网站的公司代理一款游戏需要多少钱
  • 惠州惠城区建设网站重庆首页工程设计咨询有限责任公司
  • 新农村基础设施建设网站如何自己创建购物网站
  • 建站行业有哪些项目管理软件worktile
  • 长春微网站wordpress实现动态功能
  • 网站建设设计师网上买东西
  • 蒙自建设网站阳泉网站建设
  • 品牌网站建设4a小蝌蚪公司画册
  • seo在网站建设中的作用wap网站欣赏
  • 报纸门户网站建设方案企鹅号自媒体平台注册
  • 有啦域名网站怎么做wordpress设置vip
  • 环保推广哪个网站好wordpress网站支持中文注册
  • 兰州网站排名哪家公司好衡水网站建设集团
  • 孟村县网站建设母婴网站dede织梦
  • 网站设计建设有限公司鞋子商城网站开发背景
  • 爱网站关键词挖掘wordpress文章图片格式
  • 北京网站优化方式网页设计论文结论
  • 海东电子商务网站建设网站开发字体选择