【说站】css中justify-content属性是什么
2023-06-13 09:13:23 时间
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电脑。
相关文章
- CSS小技能:常用样式属性、选择器分类、盒子模型
- JavaScript—网络编程(3)-Object、String、Array对象和prototype属性[通俗易懂]
- 在html中加入外部css样式,如何引入CSS样式表?
- 初学css list-style属性「建议收藏」
- 【说站】css中sticky属性有什么特点
- 【说站】css旋转属性如何理解
- 【说站】css Flex容器属性有哪些
- 【说站】css line-height属性是什么
- 【说站】css中flex-basis属性是什么
- 2022 最受欢迎的 CSS 变量、属性、函数以及颜色分别是什么
- Vue 子组件调用父组件的属性,方法「建议收藏」
- CSS属性继承有哪些?(回顾)
- 前端必备的 CSS 库,normalize.css
- Vivado综合属性之SRL_STYLE
- 【Java 注解】自定义注解 ( 注解属性定义与赋值 )
- 【HTML】HTML 表格 ③ ( 合并单元格 | 跨行合并 | 跨列合并 | 单元格合并顺序 | 跨行设置 rowspan 属性 | 跨列设置 colspan 属性 )
- 由 Opacity 属性引发的层叠问题思考与解决
- 【CSS】使用 z-index 属性值控制定位盒子的堆叠顺序 ( 多个盒子堆叠次序问题 | z-index 属性值简介 | 控制盒子堆叠次序 )
- CSS属性-white-space空白属性使用说明
- 简单的加密css地址防止别人下载你的CSS文件的方法
- JavaScript类和继承this属性使用说明
- CSS和JS标签style属性对照表(方便js开发的朋友)
- DOM2非标准但却支持很好的几个属性小结
- C#反射(Reflection)对类的属性get或set值实现思路
- jQuery修改class属性和CSS样式整理