好久没更新了

This commit is contained in:
asd
2021-03-23 10:58:10 +08:00
parent eca64f86c0
commit 9bf8e8d020
123 changed files with 24337 additions and 214 deletions

View File

@@ -1,57 +1,107 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
*{
margin:0;
padding:0;
* {
margin: 0;
padding: 0;
}
.box{
.box {
width: 1000px;
height: 500px;
background: pink;
display:flex;
display: flex;
/* 通过display:flex来把目标元素设置成flex布局 */
flex-direction: row;
/* align-items: center; */
justify-content: space-between;
/* flex-direction 属性决定主轴的方向值为row的时候水平排列 起点在左 */
}
.box1{
.box1 {
width: 1000px;
height: 500px;
background: gold;
display:flex;
flex-direction: row;
align-items: center;
/*
justify-content: space-between;
justify-content: space-around;
justify-content: space-center;
*/
display: flex;
flex-direction: row-reverse;
}
.left,.left1{
.left,
.left1 {
width: 200px;
height: 200px;
background: red;
}
.right,.right1{
.right,
.right1 {
width: 200px;
height: 200px;
background: blue;
}
.box3 {
flex-direction: column;
}
.box4 {
flex-direction: column-reverse;
}
</style>
</head>
<body>
<div class="box">
<div class="box" style="margin-bottom: 15px;">
<div class="left"></div>
<div class="right"></div>
<div>
这里是flex-direction:row的状况 即水平排列 起点在左侧
</div>
</div>
<div class="box">
<div class="left"></div>
<div class="left"></div>
<div class="left"></div>
<div class="left"></div>
<div class="left"></div>
<div class="left"></div>
<div class="right"></div>
<div>
这里是flex-direction:row的状况 即水平排列 起点在左侧
对于溢出的状况flex-wrap 可以定义是否换行
<P>默认属性值为 nowrap 不换行其他属性还有wrap(换行), wrap-reverse(换行,第二行反向排列)</P>
</div>
</div>
<div class="box1">
<div class="left1"></div>
<div class="right1"></div>
<div class="left1"></div>
<div>
这里是flex-direction:column的状况 即垂直排列 起点在上面
</div>
</div>
<div class="box box3">
<div class="left"></div>
<div class="right"></div>
<div>
这里是flex-direction:column的状况 即垂直排列 起点在下面
</div>
</div>
<div class="box1 box4">
<div class="right1"></div>
<div class="left1"></div>
<div>
这里是flex-direction:column-reverse的状况 即垂直排列 起点在下面
</div>
</div>
</body>
</html>