16种css悬停按钮动画效果代码
代码语言:html
所属分类:悬停
代码描述:16种css悬停按钮动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
body {
background: #292929;
padding-left: 30px;
}
.row {
float: left;
width: 100%;
}
.row .block {
float: left;
width: 25%;
height: 150px;
}
.hovicon {
display: inline-block;
font-size: 45px;
line-height: 90px;
cursor: pointer;
margin: 20px;
width: 90px;
height: 90px;
border-radius: 50%;
text-align: center;
position: relative;
text-decoration: none;
z-index: 1;
color: #fff;
}
.hovicon.small {
font-size: 20px;
line-height: 45px;
width: 45px;
height: 45px;
margin: 7px;
}
.hovicon.mini {
font-size: 15px;
line-height: 32px;
width: 30px;
height: 30px;
margin: 7px;
}
.hovicon.auto-width {
width: auto;
height: auto;
padding: 15px;
}
.hovicon:after {
pointer-events: none;
position: absolute;
width: 100%;
height: 100%;
border-radius: 50%;
content: '';
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
}
.hovicon:before {
speak: none;
font-size: 48px;
line-height: 90px;
font-style: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
display: block;
-webkit-font-smoothing: antialiased;
}
/* Effect 1 */
.hovicon.effect-1 {
background: rgba(255, 255, 255, 0.1);
-webkit-transition: background 0.2s, color 0.2s;
-moz-transition: background 0.2s, color 0.2s;
transition: background 0.2s, color 0.2s;
}
.hovicon.effect-1:after {
top: -7px;
left: -7px;
padding: 7px;
box-shadow: 0 0 0 4px #fff;
-webkit-transition: -webkit-transform 0.2s, opacity 0.2s;
-webkit-transform: scale(0.8);
-moz-transition: -moz-transform 0.2s, opacity 0.2s;
-moz-transform: scale(0.8);
-ms-transform: scale(0.8);
transition: transform 0.2s, opacity 0.2s;
transform: scale(0.8);
opacity: 0;
}
/* Effect 1a */
.hovicon.effect-1.sub-a:hover {
background: white;
color: #41ab6b;
}
.hovicon.effect-1.sub-a:hover i {
color: #41ab6b;
}
.hovicon.effect-1.sub-a:hover:after {
-webkit-transform: scale(1);
-moz-transform: scale(1);
-ms-transform: scale(1);
transform: scale(1);
opacity: 1;
}
/* Effect 1b */
.hovicon.effect-1.sub-b:hover {
background: white;
color: #41ab6b;
}
.hovicon.effect-1.sub-b:hover i {
color: #41ab6b;
}
.hovicon.effect-1.sub-b:after {
-webkit-transform: scale(1.2);
-moz-transform: scale(1.2);
-ms-transform: scale(1.2);
transform: scale(1.2);
}
.hovicon.effect-1.sub-b:hover:after {
-webkit-transform: scale(1);
-moz-transform: scale(1);
-ms-transform: scale(1);
transform: scale(1);
opacity: 1;
}
/* Effect 2 */
.hovicon.effect-2 {
color: #eea303;
box-shadow: 0 0 0 3px #fff;
-webkit-transition: color 0.3s;
-moz-transition: color 0.3s;
transition: color 0.3s;
}
.hovicon.effect-2:after {
top: -2px;
left: -2px;
padding: 2px;
z-index: -1;
background: #fff;
-webkit-transition: .........完整代码请登录后点击上方下载按钮下载查看
















网友评论0