不废话了,直接贴代码
#introduceHonor3 .collaborate .collaborateList ul .collaborateImg{
background-image:url(../img/exploreSuddenfix/consociationList.png)!important;
background-size: 23.84rem auto;
float:left;
width:1.62rem;
height:1.1rem;
}
#introduceHonor3 .collaborate .collaborateList ul i{
margin:0.4rem 0;
display:inline-block;
float:left;
width:0.02rem;
height:0.3rem;
background:rgba(209,246,243,1);
}
#introduceHonor3 .collaborate .collaborateList ul .chinaUnicom{
background-position:-8.08rem 0 ;
}
2个重点:
1: background-size: 23.84rem auto;
23.84rem = 1192/50;
1192是我的精灵图的width;
我的适配是50;所以、50;一般都是100;根据自己的适配大小;
- background-position:-8.08rem 0 ;
就是就是靠自己去计算了;
如果能帮到你我也荣幸,谢谢