小编Ned*_*edi的帖子

响应Div表

我尝试从这个网站生成一个div表:http://divtable.com/generator/

但是,除了Div Table的响应性之外,一切正常.在最小化浏览器宽度时,我希望它能够完全响应.例如,我只希望它在移动设备上每行显示两个项目.

这是我正在使用的代码:

.divTable{
    display: table;
    width: 100%;
 text-align: center;

}
.divTableRow {
    display: table-row;
}
.divTableHeading {
    background-color: #ffffff;
    display: table-header-group;
}
.divTableCell, .divTableHead {
    border: 1px solid #ffffff;
    display: table-cell;
    padding: 3px 10px;
}
.divTableHeading {
    background-color: #ffffff;
    display: table-header-group;
    font-weight: bold;
}
.divTableFoot {
    background-color: #ffffff;
    display: table-footer-group;
    font-weight: bold;
}
.divTableBody {
    display: table-row-group;
}
Run Code Online (Sandbox Code Playgroud)
<div class="divTable">
<div class="divTableBody">
<div class="divTableRow">
<div class="divTableCell"><img src="//cdn.shopify.com/s/files/1/1606/7271/files/iPhone4Parts.png?11283548812375177185" alt="" width="200" height="200" /> <br />iPhone 4 Parts</div> …
Run Code Online (Sandbox Code Playgroud)

html css grid css-tables responsive

2
推荐指数
1
解决办法
1万
查看次数

标签 统计

css ×1

css-tables ×1

grid ×1

html ×1

responsive ×1