适应您的带有表和 方形表单元格的 用例,它看起来像这样:
table { width: 90%;}td { width: 33.33%; position: relative;}td:after { content: ''; display: block; margin-top: 100%;}td .content { position: absolute; top: 0; bottom: 0; left: 0; right: 0; background: gold;}<table> <tr> <td><div >1</div></td> <td><div >1</div></td> <td><div >1</div></td> </tr> <tr> <td><div >1</div></td> <td><div >1</div></td> <td><div >1</div></td> </tr> <tr> <td><div >1</div></td> <td><div >1</div></td> <td><div >1</div></td> </tr><table>
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)