Blogger Information
Blog 19
fans 0
comment 0
visits 13392
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
flex弹性容器-第九期(191104作业)
feng
Original
622 people have browsed it

一、公共样式代码:  

实例

.container{
    border:2px dashed red;
    margin: 15px;
    background: #cdc;
}

.item{
    box-sizing: border-box;
    border: 1px solid;
    padding: 20px;
    background: #ede;
}

.flex{
    display: flex;
}

运行实例 »

点击 "运行实例" 按钮查看在线实例

二、style1样式代码: 

实例

@import "public.css";

.inline-flex{
    display: inline-flex;
}

运行实例 »

点击 "运行实例" 按钮查看在线实例

 三、style2样式代码:  

实例

@import "public.css";
a{
    padding: 5px 10px;
    margin: 0 5px;
    border-radius: 5px 5px 0 0;
    text-decoration: none;
    background-color: lightgreen;
    box-shadow: 2px 0 1px #888;
    color: black;
}

a:hover,
a:focus,
a:active{
    background-color: orangered;
    color: white;
}

nav{
    display: flex;
    border-bottom: 1px solid gray;
}

运行实例 »

点击 "运行实例" 按钮查看在线实例

四、Style3样式代码:  


实例

@import "public.css";
.row{
    flex-direction: row;
}

.row-reverse{
    flex-direction: row-reverse;
}

.column{
    flex-direction: column;
}

.column-reverse{
    flex-direction: column-reverse;
}

运行实例 »

点击 "运行实例" 按钮查看在线实例

五、Style4样式代码:  

实例

@import "style2.css";
*{
    outline: 2px solid #ccc;
    margin: 10px;
    padding: 10px;
}

body,nav,article,main{
    display: flex;
}

body,article{
    flex-direction: column;
}

footer{
    border-top: 1px solid #ccc;
}

nav{
    padding-bottom: 0;
}

运行实例 »

点击 "运行实例" 按钮查看在线实例

六、Style5样式代码:  

实例

@import "public.css";
.container{
    width: 500px;
}

.nowrap{
    flex-direction: row;
    flex-wrap: nowrap;
}

.wrap{
    flex-direction: row;
    flex-wrap: wrap;
}

.wrap-reverse{
    flex-direction: row;
    flex-wrap: wrap-reverse;
}

运行实例 »

点击 "运行实例" 按钮查看在线实例

七、Style6样式代码: 

实例

@import "public.css";
.container{
    width: 500px;
}

.nowrap{
    flex-flow: row nowrap;
}

.item{
    /*min-width: 0;*/
}

.wrap{
    flex-flow: row wrap;
}

.wrap-reverse{
    flex-flow: row wrap-reverse;
}

.column{
    flex-direction: column;
}

运行实例 »

点击 "运行实例" 按钮查看在线实例

 八、Style7样式代码:  

实例

@import "public.css";

.container{
    width: 550px;
}

.wrap{
    flex-wrap: wrap;
}

.flex-start{
    justify-content: flex-start;
}

.flex-end{
    justify-content: flex-end;
}

.center{
    justify-content: center;
}

.space-between{
    justify-content: space-between;
}

.space-around{
    justify-content: space-around;
}

.space-evenly{
    justify-content: space-evenly;
}

运行实例 »

点击 "运行实例" 按钮查看在线实例

九、Style8样式代码: 

实例

a{
    padding:5px 10px;
    margin:0 5px;
    border-radius: 5px 5px 0 0;
    text-decoration-line: none;
    background-color: lightgreen;
    box-shadow: 2px 0 1px #888;
    color: black;
}

a:hover,
a:focus,
a:active{
    background-color: orangered;
    color: white;
}

nav{
    display: flex;
    border-bottom: 1px solid gray;
    /*justify-content: flex-end;*/
    justify-content: center;
}

运行实例 »

点击 "运行实例" 按钮查看在线实例

 十、Style9样式代码:    

实例

@import "public.css";
.container{
    width: 550px;
    height: 300px;
}

.wrap{
    flex-wrap: wrap;
}
.stretch{
    align-items: stretch;
}

.flex-start{
    align-items: flex-start;
}

.flex-end{
    align-items: flex-end;
}

.center{
    align-items: center;
}

.wrap-stretch{
    align-content: stretch;
}

.wrap-flex-start{
    align-content: flex-start;
}

.wrap-flex-end{
    align-content: flex-end;
}

.wrap-center{
    align-content: center;
}
.wrap-space-between{
    align-content: space-between;
}

.wrap-space-around{
    align-content: space-around;
}

.wrap-space-evenly{
    align-content: space-evenly;
}

.all-align{
    justify-content: space-around;
    align-content: space-around;
}

运行实例 »

点击 "运行实例" 按钮查看在线实例


手抄作业:

手抄作业1.jpg

手抄作业2.jpg

手抄作业3.jpg


Correction status:qualified

Teacher's comments:这么多的代码抄完, 谈下感受, 是不是觉得程序员也不容易
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!