css
17号特工
这个作者很懒,什么都没留下…
展开
-
css中flex:1的真正含义
我们在css布局的时候经常用到flex:1;场景1:使具有弹性盒模型对象的子元素都有相同的长度,且忽略它们内部的内容:<div id="main"> <div style="background-color:coral;">红色</div> <div style="background-color:lightblue;">蓝色</div> <div style="background-color:lightgreen.原创 2022-05-13 13:29:20 · 7093 阅读 · 0 评论 -
border-radius:1px 2px 3px 4px的四个参数值代表的位置
border-radius:左上,右上,右下,左下<div class='demo'></div>.demo { width: 200px; height: 200px; background: #FF9900; border-radius: 100px 0 0 0;}原创 2021-04-06 17:28:11 · 2210 阅读 · 0 评论 -
微信小程序中使用flex布局的justify-content属性实现几种水平分布
三个子元素在父元素的排列方式。justify-content为子元素在父元素水平方向的排列方式<view class='dad'> <view class='son'>自定义</view> <view class='son'>自定义</view> <view class='son'>自定义</view&...原创 2020-04-10 19:55:35 · 4361 阅读 · 0 评论 -
flex布局实现子元素在父元素下水平垂直居中
<div class='dad'> <div class='son'></div></div>.dad{ height: 200px; width: 200px; border: 1px solid blue; margin: 50px; display: flex; //设置父元素flex属性 justify...原创 2020-03-12 17:23:18 · 3825 阅读 · 0 评论