摘要:
/* 设置自动换行 */ flex-wrap: wrap; 原图: 效果: /* 简写属性 */ flex-flow: row wrap; /* 居中排列 */ justify-content: center; /* 元素左靠*/ justify-content: flex-start; /* 元素 阅读全文
posted @ 2022-03-28 22:59
罗砂
阅读(31)
评论(0)
推荐(0)
摘要:
flex(弹性盒) 比浮动方便 是css中有一种布局手段,它主要用来替代浮动来完成页面的布局 flex可以使元素具有弹性,让元素可以跟随页面的大小的而改变而改变 弹性容器 要使用弹性盒,必须先将一个元素设置为弹性容器 我们通过 display 来设置弹性容器 display:flex 设置为块级弹性 阅读全文
posted @ 2022-03-28 13:44
罗砂
阅读(259)
评论(0)
推荐(0)
摘要:
// 混合函数,在混合函数中可以直接设置变量 // .p5(@w:100px,@h:100px,@bg-color:red ){ .p5(@w,@h,@bg-color ){ width: @w; height: @h; background-color: @bg-color; } // 必须得按照 阅读全文
posted @ 2022-03-28 10:04
罗砂
阅读(47)
评论(0)
推荐(0)
摘要:
.box1 { width: 300px; height: 100px; background-color: chartreuse; .box2 { width: 100px; height: 100px; background-color: aqua; color: rgb(226, 55, 55 阅读全文
posted @ 2022-03-28 09:46
罗砂
阅读(239)
评论(0)
推荐(0)
摘要:
.box1 { width: 300px; height: 100px; background-color: chartreuse; .box2 { width: 100px; height: 100px; background-color: aqua; color: rgb(226, 55, 55 阅读全文
posted @ 2022-03-28 09:01
罗砂
阅读(59)
评论(0)
推荐(0)

浙公网安备 33010602011771号