为何没法正常显示
@mixin toolbar-item($pos,$hoverPos){
background-position:0 $pos;
&:hover{
background-position:0 $hoverPos;
}
}
$toolbar-size:52px;
.toolbar-item,.toolbar-layer{
background-image:url(../img/toolbar.png);
background-repeat:no-repeat;
}
.toolbar{
position:fixed;
left:50px;
bottom:5px;
margin-left:-$toolbar-size / 2;
}
.toolbar-item{
position:relative;
display:block;
width:$toolbar-size;
height:$toolbar-size;
margin-top:1px;
transition:background-position 1s;
&:hover{
.toolbar-layer{
opacity:1;
filter:alpha(opacity=100);
transform:scale(1);
}
}
}
.toolbar-item-weixin{
@include toolbar-item(-798px,-860px);
.toolbar-layer{
height:212px;
background-position:0 0;
}
}
.toolbar-item-feedback{
@include toolbar-item(-426px,-488px);
}
.toolbar-item-app{
@include toolbar-item(-550px,-612px);
.toolbar-layer{
height:194px;
background-position:0 -222px;
}
}
.toolbar-item-top{
@include toolbar-item(-674px,-736px);
}
.toolbar-layer{
position:absolute;
right:$toolbar-size - 6;
bottom:-10;
width:172px;
opacity:0;
filter:alpha(opacity=0);
transform-origin:95% 95%;
transform:scale(0.01);
transition:all 1s;
}
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<title>侧栏工具</title>
<link rel="stylesheet" href="css/index.css" />
</head>
<body>
<div>
<a href="javascript:;" class="toolbar-item toolbar-itemp-weixin">
<span></span>
</a>
<a href="javascript:;" class="toolbar-item toolbar-itemp-feedback"></a>
<a href="javascript:;" class="toolbar-item toolbar-itemp-app">
<span></span>
</a>
<a href="javascript:;" class="toolbar-item toolbar-itemp-top"></a>
</div>
</body>
</html>