【说站】css中justify-content属性是什么
css中justify-content属性是什么
1、justify-content属性决定了水平方向子项的对齐和分布方式。
2、应用在弹性容器上,把弹性项沿着弹性容器的主轴线(main axis)对齐。该操作发生在弹性长度以及自动边距被确定后。
实例
.box{ display:-webkit-flex; display:flex; width:400px;height:100px;margin:0;padding:0;border-radius:5px;list-style:none;background-color:#eee;} .box li{margin:5px;padding:10px;border-radius:5px;background:#aaa;text-align:center;} #box{ -webkit-justify-content:flex-start; justify-content:flex-start; } #box2{ -webkit-justify-content:flex-end; justify-content:flex-end; } #box3{ -webkit-justify-content:center; justify-content:center; } #box4{ -webkit-justify-content:space-between; justify-content:space-between; } #box5{ -webkit-justify-content:space-around; justify-content:space-around; }
以上就是css中justify-content属性的介绍,希望对大家有所帮助。更多css学习指路:css教程
本文教程操作环境:windows7系统、css3版,DELL G3电脑。
本站发布的内容若侵犯到您的权益,请邮件联系站长删除,我们将及时处理!
从您进入本站开始,已表示您已同意接受本站【免责声明】中的一切条款!
本站大部分下载资源收集于网络,不保证其完整性以及安全性,请下载后自行研究。
本站资源仅供学习和交流使用,版权归原作者所有,请勿商业运营、违法使用和传播!请在下载后24小时之内自觉删除。
若作商业用途,请购买正版,由于未及时购买和付费发生的侵权行为,使用者自行承担,概与本站无关。