带图片的 CSS 网格样式

标签 css

http://imgur.com/IAHUR4U

我需要像上面那样设计一个网格。我唯一有问题的是同一行中彼此重叠的 2 个框。有人对如何执行此操作有任何建议吗? 干杯!

CSS:

       { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; }

.row { width: 1000px; max-width: 100%; min-width: 768px; margin: 0 auto; }
.row .row { width: auto; max-width: none; min-width: 0; margin: 0 -15px; }

.column, .columns { float: left; min-height: 1px; padding: 0 15px; position: relative; }
[class*="column"] + [class*="column"]:last-child { float: right; }
[class*="column"] + [class*="column"].end { float: left; }

.row .one { width: 8.33% }
.row .two { width: 16.66% }
.row .three { width: 25% }
.row .four { width: 33.33% }
.row .five { width: 41.66% }
.row .six { width: 50% }
.row .seven { width: 58.33% }
.row .eight { width: 66.66% }
.row .nine { width: 75% }
.row .ten { width: 83.33% }
.row .eleven { width: 91.66% }
.row .twelve { width: 100% }


.row:before, .row:after, .clearfix:before, .clearfix:after { content:""; display:table; }
.row:after, .clearfix:after { clear: both; }
.row, .clearfix { zoom: 1; }

HTML:

        <div class="row">
            <div class="three columns">
                ...
            </div>
            <div class="nine columns">
                ...
            </div>
        </div>
    <div class="row">
<div class="six columns">
        ...
    </div>
<div class="six columns">
       this is the div i need to split up into 2 divs on top of eachother
    </div>
</div>

最佳答案

我会在底部的那个上使用 float:right 和 clear:right。

关于带图片的 CSS 网格样式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25407305/

相关文章:

javascript - 如何每 10 秒捕获一次帧并将其发送到服务器?

html - 在底部显示多个内联div的内容

javascript - 在测验中创建一个像视频游戏一样的生活系统

css - 除了一个属性外,所有在 Sencha Touch 2 列表中工作的 CSS

jquery - 如何在桌面上制作带有切换功能的引导折叠菜单

javascript - 当我点击这个文本框时它变大但是当我点击离开我如何让它恢复正常?

css - KendoTreeView 和 AngularJS : icons are not displayed

javascript - html nsted 选项卡未打开 - 未捕获的类型错误 : Cannot read property 'Style' of null

html - 无法获得页面的完整宽度和图像 div 的大小不正确

html - CSS中的半椭圆形