css怎样让元素显示指定的宽高比

.father { width: 100% }
.child { width: 100%; height: 0; padding-bottom: 20%; background: green; overflow: hidden; }
<body>
     <div class="father">
        <div class="child"></div>
    </div>
</body>
原文地址:https://www.cnblogs.com/ladybug7/p/12255513.html