63

CSS实现宽高等比例自适应矩形

 5 years ago
source link: https://juejin.im/post/5b0784566fb9a07abd0e14ae
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
本文首发于虾哔哔的Blog 概述 今天遇到一个很有趣的问题:如何实现一个宽度自适应,高度为宽度的一半的矩形。 经过搜索引擎的筛选和自己的反复试验,发现使用padding-bottom是最完美的解决方案。 解决方案 首先我们要明白,padding和margin都

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK