css实现一个可爱老虎睁眼闭眼checkbox开关效果代码
代码语言:html
所属分类:表单美化
代码描述:css实现一个可爱老虎睁眼闭眼checkbox开关效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<style>
@import url("https://fonts.googleapis.com/css?family=Montserrat");
.balloon {
position: absolute;
width: 90px;
height: 125px;
top: 18px;
left: 234px;
}
.balloon--off .balloon__part {
position: absolute;
background-color: #fff;
border-radius: 50%;
opacity: 0.8;
}
.balloon--off .balloon__part:nth-of-type(1) {
width: 60px;
height: 60px;
top: 0;
left: 27px;
-webkit-animation: balloon3 4s ease normal infinite;
animation: balloon3 4s ease normal infinite;
-webkit-animation-fill-mode: both;
animation-fill-mode: both;
}
.balloon--off .balloon__part:nth-of-type(2) {
width: 40px;
height: 40px;
top: 63px;
left: 15px;
-webkit-animation: balloon2 4s ease normal infinite;
animation: balloon2 4s ease normal infinite;
-webkit-animation-fill-mode: both;
animation-fill-mode: both;
}
.balloon--off .balloon__part:nth-of-type(3) {
width: 20px;
height: 20px;
top: 104px;
left: 0;
-webkit-animation: balloon1 4s ease normal infinite;
animation: balloon1 4s ease normal infinite;
-webkit-animation-fill-mode: both;
animation-fill-mode: both;
}
.balloon--on {
display: none;
position: absolute;
top: 18px;
left: 234px;
width: 134px;
height: 93px;
background-color: #fff;
border-radius: 50%;
transform: rotate(10deg);
}
.balloon--on:before {
content: "";
position: absolute;
bottom: 1px;
width: 0;
height: 0;
border-top: 20px solid #fff;
border-left: 8px solid transparent;
border-right: 8px solid transparent;
transform: rotate(42deg);
}
.balloon--on .balloon__text {
margin: auto;
text-align: center;
font-weight: .........完整代码请登录后点击上方下载按钮下载查看
















网友评论0