根據(jù)老師教程實現(xiàn)純css實現(xiàn)的icon導航功能 效果: http://www.xixitoday.com/css-study/css-sprite/index.html
代碼: https://github.com/xiyuanyuan/css-study/tree/master/css-sprite
代碼: https://github.com/xiyuanyuan/css-study/tree/master/css-sprite
2017-02-14
最新回答 / Femon
width:24px,height:40px,display:block,設(shè)置s標簽設(shè)置為一個寬24像素,高40像素的一個塊狀元素,再通過background-position樣式讓整個背景圖片從0,0位置顯示,這樣第一個圖標就可以正好顯示出來,s標簽類似于在背景圖片上做遮罩的效果,而其他圖標在寬24像素,高40像素以外,所以你看不到。如果你問的是怎么快速準確設(shè)置輔助線的話,請在PS里插件安裝guideguide<...圖片...>
2017-01-13