炫酷radio点击带枪射击效果
代码语言:html
所属分类:表单美化
代码描述:炫酷radio点击带枪射击效果
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<style>
body {
background: #f4faff;
font-family: 'Averia Libre', sans-serif;
display: grid;
height: 100vh;
place-items: center;
overflow: hidden;
}
* {
box-sizing: border-box;
}
*:before, *:after {
content: '';
position: absolute;
}
.wrapper {
display: inline-block;
position: relative;
perspective: 100em;
transition: .4s ease;
font-size: 20px;
}
.page {
background: white;
min-width: 398px;
max-width: 500px;
border-radius: 20px;
box-shadow: 0 3px 12px rgba(70, 107, 255, 0.1);
border: 1px solid rgba(69, 103, 207, 0.1);
transform-style: preserve-3d;
transition: .5s ease;
padding: 30px 40px 20px;
position: relative;
z-index: 0;
}
.page p {
font-size: 26px;
font-weight: 700;
margin-bottom: 20px;
}
.gun {
position: absolute;
top: 0;
left: -200px;
z-index: 1;
transform: translateY(1000px);
transition: .9s ease-in-out;
}
.gun__main {
width: 175px;
height: 100px;
background: #344793;
border-radius: 4px;
padding: 10px;
text-align: right;
position: relative;
}
.gun__main:before {
background: #f97822;
width: 6px;
height: 30px;
right: -6px;
}
.gun__main:after {
background: #f97822;
width: 5px;
height: 22px;
right: -11px;
top: 15px;
}
.gun__yellow {
width: 80%;
margin-left: auto;
background: #fdbb2f;
height: 83%;
border-radius: 3px;
position: relative;
}
.gun__yellow .line {
position: absolute;
background: #ffdeaa;
width: 80%;
height: 9px;
bottom: 10px;
left: 18px;
border-radius: 20px;
box-shadow: 0 -18px 0 0px #ffdeaa, 0px -36px 0 0px #ffdeaa;
}
.gun__accent-1 {
position: absolute;
width: 22px;
top: 19px;
height: 50px;
left: 12px;
border-radius: 100% 2px 2px 100%;
background: linear-gradient(to right, #4567cf 50%, #344793 50%, #344793 75%, #4567cf 75%);
}
.gun__accent-1:before {
background: #4567cf;
width: 85px;
bottom: -25px;
height: 5px;
border-radius: 5px;
left: 32px;
}
.gun__accent-1:after {
border-radius: 50%;
bottom: -30px;
left: 135px;
width: 8px;
height: 8px;
border: 2px solid #4567cf;
}
.gun__accent-2 {
background: #344793;
width: 35px;
height: 20px;
bottom: -7px;
right: 0;
position: absolute;
background: linear-gradient(135deg, #344793 65%, #f4faff 65%);
background-repeat: no-repeat;
}
.gun__accent-2:before {
width: 18px;
height: 10px;
background: #344793;
bottom: 4px;
left: -14px;
transform: rotate(30deg);
}
.gun__handle {
position: absolute;
width: 100px;
height: 70px;
top: -5px;
left: -90px;
border-radius: 2px;
transform: skew(-20deg);
background: #344793;
}
.gun__handle .top {
background: #fdbb2f;
width: 100%;
height: 72%;
position: absolute;
border-radius: 2px;
left: -5px;
top: -2px;
display: flex;
justify-content: space-between;
align-items: flex-end;
padding: 10px 15px;
}
.gun__handle .top:before {
width: 85%;
top: -3px;
height: 4px;
background: #f97822;
left: 6px;
transform: skew(20deg);
}
.gun__handle .top:after {
width: 8px;
height: 8px;
background: #f4faff;
border: 5px solid #fdbb2f;
transform: skew(20deg);
top: 6px;
left: -7px;
border-radius: 50%;
}
.gun__handle .line {
height: 35px;
width: 5px;
border-radius: 2px;
bottom: 10px;
background: #ffdeaa;
left: 20px;
}
.gun__handle .line-long {
height: 90%;
}
.gun__handle .line-short {
height: 55%;
}
.gun__handle .bottom {
background: #344793;
width: 60px;
height: 100px;
position: absolute;
top: 82px;
left: 35px;
border-radius: 80% 100% 100% 120%;
transform: skew(20deg) rotate(25deg);
}
.gun__handle .bottom:before {
width: 38px;
height: 55px;
top: 47%;
left: 41%;
border-radius: 80% 20% 60% 100% / 20% 60% 50% 20%;
background: inherit;
}
.gun__handle .bottom:after {
width: 20px;
height: 20px;
background: #344793;
border-radius: 50%;
top: 82px;
right: -5px;
}
.gun__handle .middle {
position: absolute;
width: 112px;
background: #344793;
height: 47px;
top: 45px;
left: 2px;
border-radius: 3px;
transform: skew(20deg) rotate(15deg);
}
.gun__handle .middle:before {
background: #344793;
width: 30px;
height: 50px;
left: 10px;
top: 15px;
}
.gun__handle .middle:after {
background: #f4faff;
width: 50px;
height: 50px;
border-radius: 50%;
left: -18px;
top: 35px;
}
.gun__accent-3 {
width: 20px;
height: 20px;
background: #344793;
position: absolute;
top: 145px;
border-radius: 50%;
left: -52px;
box-shadow: 9px -33px 0 0px #344793;
}
.gun__accent-3:before {
width: 6px;
height: 25px;
background: #4567cf;
border-radius: 5px;
transform: rotate(20deg);
left: -30px;
bottom: 30px;
}
.gun__accent-3:after {
width: 6px;
height: 6px;
background: #4567cf;
border-radius: 5px;
left: -36px;
bottom: 20px;
}
.gun__accent-4 {
width: 30px;
background: #fdbb2f;
height: 15px;
top: 92px;
left: 10px;
position: absolute;
background: linear-gradient(115deg, #344793 90%, #f4faff 90%);
}
.gun__accent-4:before {
border-radius: 50%;
bottom: 8px;
left: 10px;
width: 8px;
height: 8px;
border: 2px solid #4567cf;
}
.gun__accent-4:after {
background: #f4faff;
width: 40px;
height: 20px;
border-radius: 100%;
left: -30px;
bottom: -10px;
}
.gun__trigger {
position: absolute;
width: 30.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0