css中编辑此样式:
.bg { background:url(图片地址) no-repeat center; background-size:contain; }
然后在你的div里引用这个样式就行了:
<div class="row bg">
使图片不随滚动条滚动,即固定不动则加fixd:
.bg { background:url(图片地址) no-repeat center fixed; background-size:contain; }
转载于:https://www.cnblogs.com/Hayley1666/p/8479491.html