.imgview{
width: 100vw;
height: 100vh;
background-image: url(http://i2.tiimg.com/721144/e7f80e2fe982794a.png);
background-repeat: no-repeat;
background-size:cover;
background-position:center;
}
这段代码是将图片作为背景图片。实现居中全屏的效果。
.imgview{
width: 100vw;
height: 100vh;
background-image: url(http://i2.tiimg.com/721144/e7f80e2fe982794a.png);
background-repeat: no-repeat;
background-size:cover;
background-position:center;
}
这段代码是将图片作为背景图片。实现居中全屏的效果。