如何让让多个横向的DIV居中显示

来源:互联网 发布:开个淘宝网店多少钱 编辑:程序博客网 时间:2024/05/22 03:52
<!DOCTYPE html><html><head>    <title>Test</title>    <style>        .parent { width:1500px;height:250px;margin:0 auto;text-align:center;background-color:red;}        .children {display:inline-block;width:100px;height:250px;}        /**+ html .children { display:inline;zoom:1;}*/        /** html .children { display:inline;zoom:1;}*/    </style></head><body><div class="parent">    <div class="children" style="background-color:green;"></div>    <div class="children" style="background-color:red;"></div>    <div class="children" style="background-color:yellow;"></div>    <div class="children" style="background-color:blue;"></div>    <div class="children" style="background-color:green;"></div>    <div class="children" style="background-color:red;"></div>    <div class="children" style="background-color:yellow;"></div>    <div class="children" style="background-color:blue;"></div>    <div class="children" style="background-color:green;"></div></div></body></html>
0 0
原创粉丝点击