align-items 属性
语法align-items: flex-start | flex-end | center | baseline | stretch 各个值解析:
以下实例演示了 .flex-container { display: -webkit-flex; display: flex; -webkit-align-items: stretch; align-items: stretch; width: 400px; height: 250px; background-color: lightgrey; } 以下实例演示了 .flex-container { display: -webkit-flex; display: flex; -webkit-align-items: flex-start; align-items: flex-start; width: 400px; height: 250px; background-color: lightgrey; } 以下实例演示了 .flex-container { display: -webkit-flex; display: flex; -webkit-align-items: flex-end; align-items: flex-end; width: 400px; height: 250px; background-color: lightgrey; } 以下实例演示了 .flex-container { display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center; width: 400px; height: 250px; background-color: lightgrey; } 以下实例演示了 .flex-container { display: -webkit-flex; display: flex; -webkit-align-items: baseline; align-items: baseline; width: 400px; height: 250px; background-color: lightgrey; } flex-wrap 属性flex-wrap 属性用于指定弹性盒子的子元素换行方式。 语法flex-wrap: nowrap|wrap|wrap-reverse|initial|inherit; 各个值解析:
以下实例演示了 .flex-container { display: -webkit-flex; display: flex; -webkit-flex-wrap: nowrap; flex-wrap: nowrap; width: 300px; height: 250px; background-color: lightgrey; } 以下实例演示了 .flex-container { display: -webkit-flex; display: flex; -webkit-flex-wrap: wrap; flex-wrap: wrap; width: 300px; height: 250px; background-color: lightgrey; } 以下实例演示了 .flex-container { display: -webkit-flex; display: flex; -webkit-flex-wrap: wrap-reverse; flex-wrap: wrap-reverse; width: 300px; height: 250px; background-color: lightgrey; } align-content 属性
语法align-content: flex-start | flex-end | center | space-between | space-around | stretch 各个值解析:
以下实例演示了 .flex-container { display: -webkit-flex; display: flex; -webkit-flex-wrap: wrap; flex-wrap: wrap; -webkit-align-content: center; align-content: center; width: 300px; height: 300px; background-color: lightgrey; } |
Archiver|手机版|小黑屋|小白教程 ( 粤ICP备20019910号 )
GMT+8, 2025-1-18 15:55 , Processed in 0.017801 second(s), 18 queries .
Powered by Discuz! X3.4
© 2001-2017 Comsenz Inc. Template By 【未来科技】【 www.wekei.cn 】