如何设置按钮图片的上间距和下间距

(1)

html

<button id="btn_OrderTime" type="button" class="btn btn-mini btn-img" onclick="orderByOrderTime()">
收藏时间
<i class="icon-down"></i>
</button>

css 

<style>

/*background: url(/sysres/images/icon-down.png) left top no-repeat;*/
.icon-down {
background: url(/sysres/images/icon-down.png) 1px 2px no-repeat;
background-size: 12px;
}

</style>

(2)

<a class="btn">
<img src="/sysres/images/icon-down.png" />
</a>

<style>
.btn img {
13px; //设置图片的大小
position: relative;//定位类型为相对定位
left: 1px;//图片的左间距
top: 1px;//图片的上间距
}
</style>

原文地址:https://www.cnblogs.com/lwy1103/p/6209779.html