<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons"> * {
font-family: 'Microsoft YaHei','Lantinghei SC','Open Sans',Arial,'Hiragino Sans GB','STHeiti','WenQuanYi Micro Hei','SimSun',sans-serif;
}
body {
font-size: 1rem;
background-color: #ebebeb;
padding: 20px;
text-align: center;
}
h1 {
font-weight: 100;
color: #777;
}
.main-wrapper {
border-radius: 4px;
background-color: white;
padding: 20px;
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
position: relative;
}
i.material-icons {
font-size: 1.5rem;
color: white;
position: relative;
border-radius: 50%;
padding: 5px;
margin: 3px;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
transition: color 0.2s ease, background-color 0.2s ease, transform 0.3s ease;
}
i.material-icons:after {
content: "";
width: 100%;
height: 100%;
border: solid 2px;
transform: scale(0.8);
position: absolute;
top: -2px;
left: -2px;
border-radius: 50%;
transition: all 0.3s ease;
}
i.material-icons:hover:after {
transform: scale(1);
box-shadow: 10px 0 20px rgba(0, 0, 0, 0.19), 6px 0 6px rgba(0, 0, 0, 0.23);
}
i.material-icons:nth-of-type(4) {
background-color: #88b999;
}
i.material-icons:nth-of-type(4):hover {
color: #88b999;
}
i.material-icons:nth-of-type(4):after {
border-color: #88b999;
}
i.material-icons:nth-of-type(5) {
background-color: #88b2b9;
}
i.material-icons:nth-of-type(5):hover {
color: #88b2b9;
}
i.material-icons:nth-of-type(5):after {
border-color: #88b2b9;
} <h1>鼠标悬停旋转的图标按钮特效</h1>
<div class="main-wrapper">
<i class="material-icons">attach_file</i>
<i class="material-icons">settings</i>
<i class="material-icons">refresh</i>
<i class="material-icons">search</i>
<i class="material-icons">explore</i>
<i class="material-icons">public</i>
<i class="material-icons">autorenew</i>
<i class="material-icons">add</i>
</div>
*
回帖描述:*
链接类型:*
下载链接:*
描述:*
回帖描述:*
链接类型:*
阅读权限:*
下载链接:



聚优部落技术论坛 © 版权所有 鲁ICP备15007479号-6
Copyright(C)web.com, All Rights Reserved.
