html – 按比例增加/减少包装器

前端之家收集整理的这篇文章主要介绍了html – 按比例增加/减少包装器前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

demo@H_301_2@

HTML …@H_301_2@

@H_301_2@

三网融合@H_301_2@

@H_301_2@

img{
    background-color: red;
    display: block;
    border: 2px solid white;
}

我尝试过的:@H_301_2@

@H_301_2@

#main table{
    width: 200px;
    display: table;
    table-layout: fixed;
}

demo@H_301_2@

@H_301_2@

What I want is here:@H_301_2@

原始尺寸:@H_301_2@

当我重新调整主要大小时:@H_301_2@

最佳答案
使用缩放属性,例如:@H_301_2@

@H_301_2@

#main table{
    width: 300px;
    display: table;
    table-layout: fixed;
    zoom: 0.4;    
 }

猜你在找的HTML相关文章