$ToolBar-size: 52px; .ToolBar{ position: fixed; left: 50%; bottom: 5px; top: 600px; margin-left: -$ToolBar-size/2; } .ToolBar-item{ display: block; width: $ToolBar-size; height: $ToolBar-size; background-image: url(../img/ToolBar.png); background-repeat: no-repeat; margin-top: 1px; } .ToolBar-item-weixin{ position: fixed; background-position: 0 -798px; &:hover { background-position: 0 -860px; } } .ToolBar-item-feedback{ position: fixed; background-position: 0 -426px; &:hover { background-position: 0 -488px; } } .ToolBar-item-app{ position: fixed; background-position: 0 -550px; &:hover { background-position: 0 -612px; } } .ToolBar-item-top{ position: fixed; background-position: 0 -674px; &:hover { background-position: 0 -736px; } } .toolbar-layer{ position: fixed; }
找到原因了 .ToolBar-item-weixin以后的类定位为Relative 就好了