◆◆0 html标签背景图案自适应轴心缩放的方法 Zanyxd 2019年1月28日 博客相关, 设计相关 777 0 自适应轴心缩放的关键 background:url(./img/图片名.png) no-repeat; background-position:center; background-size: cover; overflow:hidden; 再基于第一步让子元素居中(拓展) html,body{ position: relative; min-height: 100vh; width: 100%; height: 100%; margin: 0; background-image: url(../img/图片名.png); box-sizing: border-box; background-position: center center; background-size: cover; background-repeat: no-repeat; background-attachment: fixed; /* overflow:hidden;*/ background-color: rgba(228,228,228,1.00); display: flex; justify-content: center; align-items: center; z-index: 100; } 声明:本文为原创,作者为 Zanyxd,转载时请保留本声明及附带文章链接:https://blog.bugcola.com/note/index.php/279/ 上一篇: [解决记录]改完域名解析记录值无法访问+访问网页403Forbidden 下一篇: 嫌百度首页的红条烦?盘他!
发表评论