运行代码
保存代码
复制代码
提示:您可以先修改部分代码再运行,保存代码功能在Firefox下无效。
使用margin-left:auto;margin-right:auto; 可以让你的div居中对齐。 .style{margin-left:auto;margin-right:auto;} 缩写形式为: .style{margin:0 auto;} 数字0 表示上下边距是0。可以按照需要设置成不同的值。
由源码搜藏网整理,转载请注明出处https://www.codesocang.com/tx-css/538.html