<!doctype html><html lang="en"><head> <meta charset="UTF-8" /> <title> 页面名称 </title><style type="text/css">#test1 { width: 16px; height: 17px; background: #999 url("http://img.bbs.csdn.net/upload/201509/17/1442477922_879930.png") no-repeat left bottom;}#test2 { width: 16px; height: 17px; background: #999 url("http://img.bbs.csdn.net/upload/201509/17/1442477922_879930.png") no-repeat left top;}</style></head><body><div id="test1"></div>-----------------------------<div id="test2"></div></body></html>
啊啊 会了 就是用个容器把图片包住,容器设置高度
然后css设置图片的position属性为relative,还有top为XXpx
就可以实现效果了