Div嵌套居中

2017-08-21  本文已影响0人  丿沧海一粟丿
image.png
<div style="background-color:#f3f3f3; width:700px; height:180px; padding:20px;">
    <div style="width:660px; height:140px; background-color:#fefcf9; overflow:hidden;">

        <div style="width:100%; height:50px; background-color:#0094ff;">
            <div style="width:325px; height:40px; margin-right:5px; background-color:#ff6a00; float:left;">
                <div style="text-align:center; background-color:#dcdcdc; width:125px; height:40px; float:left; line-height:40px;">2017年01月</div>
                <div style="background-color:white; height:40px; width:200px; text-align:center; float:left;  line-height:40px;">16,339,80</div>
            </div>
            <div style="width:325px; height:40px; margin-left:5px; background-color:#ff6a00; float:left;">
                <div style="text-align:center; background-color:#dcdcdc; width:125px; height:40px; float:left; line-height:40px;">2017年02月</div>
                <div style="background-color:white; height:40px; width:200px; text-align:center; float:left;  line-height:40px;">16,339,80</div>
            </div>
        </div>

        <div style="width:100%; height:50px; background-color:#0094ff;">
            <div style="width:325px; height:40px; margin-right:5px; background-color:#ff6a00; float:left;">
                <div style="text-align:center; background-color:#dcdcdc; width:125px; height:40px; float:left; line-height:40px;">2017年03月</div>
                <div style="background-color:white; height:40px; width:200px; text-align:center; float:left;  line-height:40px;">16,339,80</div>
            </div>
            <div style="width:325px; height:40px; margin-left:5px; background-color:#ff6a00; float:left;">
                <div style="text-align:center; background-color:#dcdcdc; width:125px; height:40px; float:left; line-height:40px;">2017年04月</div>
                <div style="background-color:white; height:40px; width:200px; text-align:center; float:left;  line-height:40px;">16,339,80</div>
            </div>
        </div>

        <div style="width:100%; height:50px; background-color:#0094ff;">
            <div style="width:325px; height:40px; margin-right:5px; background-color:#ff6a00; float:left;">
                <div style="text-align:center; background-color:#dcdcdc; width:125px; height:40px; float:left; line-height:40px;">2017年05月</div>
                <div style="background-color:white; height:40px; width:200px; text-align:center; float:left;  line-height:40px;">16,339,80</div>
            </div>
            <div style="width:325px; height:40px; margin-left:5px; background-color:#ff6a00; float:left;">
                <div style="text-align:center; background-color:#dcdcdc; width:125px; height:40px; float:left; line-height:40px;">2017年06月</div>
                <div style="background-color:white; height:40px; width:200px; text-align:center; float:left;  line-height:40px;">16,339,80</div>
            </div>
        </div>

    </div>
</div>
上一篇 下一篇

猜你喜欢

热点阅读