会员
周边
众包
新闻
博问
闪存
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
Amy-WebFrontEnd
It's not how big the house is,it's how happy the house is.
博客园
首页
新随笔
联系
订阅
管理
2021年12月16日
使用padding代替高度实现背景图片、图片等比例自适应
摘要: 一、背景图片 使用padding代替高度的原因可查阅参考1链接 固定宽高比 .boxWrapper{ max-width: 320px; } .box { width: 100%; height: 0; padding-bottom: 84.375%; /*图片宽高 320/270 270/375=
阅读全文
posted @ 2021-12-16 16:08 Amy-WebFrontEnd
阅读(171)
评论(0)
推荐(0)
编辑
公告