<style> .test1{ background-image: url("./glyphicons-halflings.png"); //設置背景圖(大圖) width: 16px;//設置要顯示圖片寬度 height: 16px;//設置要顯示圖片高度 background-position: -192px -48px;//圖片定位,在圖片當中取負值,以左上角爲中心原點 } .test2{ background-image: url("./glyphicons-halflings.png"); width: 16px; height: 16px; background-position: -264px -144px; } .test3{ background-image: url("./glyphicons-halflings.png"); width: 16px; height: 16px; background-position: -96px -144px; } </style> <div class="test1"> </div> <div class="test2"> </div> <div class="test3"> </div>
最終效果圖url
量圖軟件 Mark Manspa