.c { padding-top: 10px; padding-right: 0.25%; padding-bottom: 2ex; padding-left: 20%; } 内边距上下左右设置div内的内容,还可以设置百分比边距根据父布局,同理可得div位置margin: top right bottom left 上边距 右边距 底部边距,左边距也都可以设置这样就把单个 DIV的定位解决,如果多个div一起有 static是默认方式 相对定位relative .c{ postion:relative top: right: bottom: left: 绝对定位 .c1 {postion:absolute; top: right: bottom: } display:inline div 并排显示
css的几种移动方式
最新推荐文章于 2023-01-05 09:56:27 发布