自定义代码模板:
.<%=name%> {
background-position: -<%=(x/2)%>px -<%=(y/2)%>px;
width: <%=(w/2)%>px;
height: <%=(h/2)%>px;
}
如果传的是2倍图,那么页面需要展示的实际宽度是x/2,
自定义代码模板:
.<%=name%> {
background-position: -<%=(x/2)%>px -<%=(y/2)%>px;
width: <%=(w/2)%>px;
height: <%=(h/2)%>px;
}
如果传的是2倍图,那么页面需要展示的实际宽度是x/2,