css margin缩写简写巧妙记法

您所在的位置:网站首页 autumn缩写成auto行吗 css margin缩写简写巧妙记法

css margin缩写简写巧妙记法

2024-06-13 20:30| 来源: 网络整理| 查看: 265

top right bottom left(值都不同) margin-top: 10px; margin-right: 20px; margin-bottom:30px; margin-left: 40px; 缩写:margin:10px 20px 30px 40px;

top right bottom left(值相同) margin-top: 10px; margin-right: 10px; margin-bottom:10px; margin-left: 10px; 缩写:margin:10px;

top right bottom left (right left 值相同 ) margin-top: 10px; margin-right: 20px; margin-bottom:30px; margin-left: 20px; 缩写:margin:10px 20px 30px; 附加: 原始:margin-top:5px; margin-bottom:6px; margin-left:4px 缩写:margin:5px 0 6px 4px或margin:5px auto 6px 4px

top right bottom left (top bottom 值相同 无) margin-top: 10px; margin-right: 20px; margin-bottom:10px; margin-left:30px; 缩写:margin:10px 20px 30px; 说明:应该没有此类缩写,上下一样有点不可实现上下一样的话就是垂直居中了对吧?不然和第3点缩写后都是3个值,看不出来是左右相同还是上下相同的缩写 有不对的地方欢迎大家指正!

top right bottom left (top 和bottom 值相同,right 和left 值相同 ) margin-top: 10px; margin-right: 20px; margin-bottom:10px; margin-left:20px; 缩写:margin:10px 20px; 附加: margin:0 auto;横向居中; (上下为0,左右自动,则水平居中) margin:auto 0;纵向居中;(左右为0,上下为0,则垂直居中



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3