css 背景图片居中,高度撑满,左右超出隐藏
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
<div style="
background-image: url('./img/111425_4c5b6563a1fd2.jpg');
background-repeat: no-repeat;
background-position: center center;
background-size: auto 100%;
overflow: hidden;
">
<div>123456</div>
<div>123456</div>
<div>123456</div>
<div>123456</div>
<div>123456</div>
<div>123456</div>
<div>123456</div>
<div>123456</div>
<div>123456</div>
<div>123456</div>
</div>
</body>
<style>
div {
font-size: 200px;
}
</style>
</html>
原文地址:https://blog.csdn.net/qq_53066920/article/details/145230355
免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!