答案 0 :(得分:0)
您可以使用css box-shadow
属性:
a
{
display: inline-block;
height: 40px;
box-shadow: 0 0 0 grey;
background-color: grey;
-webkit-transition: all 0.2s ease;
-moz-transition: all 0.2s ease;
-ms-transition: all 0.2s ease;
-o-transition: all 0.2s ease;
transition: all 0.2s ease;
}
a:hover
{
background-color: #004890;
box-shadow: 0 -8px 0 #004890;
color: white;
}
例如:JSBin