css布局实现hello kitty可爱儿童卡通闹钟效果代码
代码语言:html
所属分类:布局界面
代码描述:css布局实现hello kitty可爱儿童卡通闹钟效果代码
代码标签: css hello kitty 可爱 儿童 卡通 闹钟
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
background: linear-gradient(90deg, rgb(134, 63, 75) 50%, rgb(207, 93, 112) 50%);
}
.container {
position: relative;
display: flex;
align-items: center;
justify-content: center;
height: 80vh;
transition: .5s;
}
input[type="checkbox"] {
position: absolute;
top: -70px;
left: 40%;
-webkit-appearance: none;
appearance: none;
height: 50px;
width: 60px;
border: 4px solid #000;
background-color: rgb(197, 0, 33);
border-top-left-radius: 25px;
border-top-right-radius: 25px;
outline: none;
}
input[type="checkbox"]:checked {
background-color: rgb(255, 255, 0);
top: -50px;
height: 30px;
}
input[type="checkbox"]:checked + label {
animation-play-state: paused;
}
.head{
position: absolute;
left: 25%;
top: 30%;
width: 160px;
height: 140px;
border: 3px solid #000;
border-radius: 50%;
background-color: #fff;
}
.ears .........完整代码请登录后点击上方下载按钮下载查看
















网友评论0