图片很宽的时候,需要保留中间部分,左右不需要显示完整,写法如下:
background-image: url(https://phyimgs.007vin.com/ugc/1000001/982925039a76f22c4efcd76221cfeaff.jpg);
background-position: center;
background-repeat: no-repeat;
background-size: cover;
图片很宽的时候,需要保留中间部分,左右不需要显示完整,写法如下:
background-image: url(https://phyimgs.007vin.com/ugc/1000001/982925039a76f22c4efcd76221cfeaff.jpg);
background-position: center;
background-repeat: no-repeat;
background-size: cover;
一.Vue文件內容 <template> </template> <script> </script> <style> </style>