checkbox表情悬浮动画选择效果
代码语言:html
所属分类:表单美化
代码描述:checkbox表情悬浮动画选择效果
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
@charset "UTF-8";
@font-face {
font-family: "Quicksand";
font-weight: 500 700;
src: url("https://s3-us-west-2.amazonaws.com/s.cdpn.io/240751/Quicksand-VariableFont_wght.ttf") format("truetype");
}
*,
*:before,
*:after {
box-sizing: border-box;
}
html {
font-size: 1.125em;
}
body {
margin: 0;
min-height: 100vh;
display: grid;
grid-template-columns: 1fr;
place-content: center;
font-family: "Quicksand", sans-serif;
font-display: swap;
color: #53565a;
background: #7ba7bc;
}
#app {
width: 100%;
max-width: calc(16rem + 6vmin);
border-radius: 6px;
margin: auto;
border: 2px solid #53565a;
padding: 2.5rem;
background: #fff;
box-shadow: 0.5em 0.5em 0 0 #34657f;
}
#app h1 {
font-size: calc(1rem + 3vmin);
margin: 0 0 0.75em;
padding-bottom: 0.5em;
line-height: 1em;
border-bottom: 2px solid #a7a8aa;
font-weight: normal;
}
#app h1 span {
color: #ffd100;
font-weight: bold;
}
#app form {
font-size: calc(0.8rem + 2vmin);
width: 100%;
}
#app form .group {
line-height: 1;
}
#app form label {
display: inline-block;
line-height: 1.2;
-webkit-transition: all 0.2s cubic-bezier(0.5, 0, 0.5, 1);
transition: all 0.2s cubic-bezier(0.5, 0, 0.5, 1);
border-bottom: 1px solid transparent;
}
#app form label:hover {
cursor: url("http://repo.bfw.wiki/bfwrepo/icon/5e867b0cc54a2.png"), auto;
}
#app form input[type="checkbox"] {
position: absolute;
left: -100vw;
width: 1px;
.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0