1、css弹性盒子属性
父级元素属性的设置
#father{ ???????????????width: 800px; ???????????????height: 300px; ???????????????background-color: darkgray; ???????????????/*定义父级元素为弹性元素*/ ???????????????display: flex; ???????????????/*水平方向的对齐方式*/ ???????????????/*justify-content:flex-start;*/ ???????????????/*垂直对齐方式*/ ???????????????/*align-items:center;*/ ???????????????/*换行方式*/ ???????????????/*flex-wrap: wrap;*/ ???????????????/*排列方式*/ ???????????????flex-direction:column-reverse; ???????????}
下面是html代码
<div id="father"> ???????????<div class="son">1</div> ???????????<div class="son1">2</div> ???????????<div class="son">3</div> ???????</div>
#father{
width: 800px;
height: 300px;
background-color: darkgray;
/*定义父级元素为弹性元素*/
display: flex;
/*水平方向的对齐方式*/
/*justify-content:flex-start;*/
/*垂直对齐方式*/
/*align-items:center;*/
/*换行方式*/
/*flex-wrap: wrap;*/
/*排列方式*/
flex-direction:column-reverse;
}
css3部分整理
原文地址:https://www.cnblogs.com/comeon0328/p/8707591.html