div+css实现按钮鼠标悬停动画效果代码
代码语言:html
所属分类:悬停
代码描述:div+css实现按钮鼠标悬停动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
@media screen and (max-width: 992px) {
html {
font-size: 1.5vw;
}
}
body {
background: #1B1B1B;
}
body > div {
display: flex;
margin: auto;
max-width: 90rem;
}
body > div > div {
flex: 1 1 auto;
text-align: center;
padding-bottom: 1.5rem;
position: relative;
}
label {
margin: 5rem auto 7rem;
font-size: 7rem;
color: #494949;
font-family: sans-serif;
display: block;
}
button {
font-size: 3rem;
color: #fff;
cursor: pointer;
}
.btn-a {
border-radius: 6rem;
padding: 2.5rem 5.5rem;
background: radial-gradient(ellipse at 50% 150%, #cdb7e2, #9A6EC4, #040404);
border: none;
box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1), inset 0 0 1rem 0 rgba(255, 255, 255, 0.25), 0 0 0 1.5rem rgba(255, 255, 255, 0.025);
transition: all 0.25s ease-in-out;
}
.btn-a:hover, .btn-afocus {
filter: contrast(1.3);
box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1), inset 0 0 1rem 0 rgba(255, 255, 255, 0.5), 0 0 0 1rem rgba(255, 255, 255, 0.05);
}
.btn-b {
border-radius: 6rem;
background: none;
border: none;
color: rgba(255, 255, 255, 0);
font-size: 0.3rem;
width: 25rem;
height: 11rem;
position: relative;
filter: blur(0.01rem);
}
.btn-b:hover:before, .btn-b:focus:before {
transform: rotate(-8deg) translate3d(-1rem, 0.5rem, 0);
}
.btn-b:hover:after, .btn.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0