bootstrap票据单选选择效果代码
代码语言:html
所属分类:其他
代码描述:bootstrap票据单选选择效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/bootstrap.4.5.2.css">
<link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/unicons.css">
<style>
/* Please ❤ this if you like it! */
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@700;900&display=swap');
:root {
font-size: 20px;
--dark-blue: #1f2029;
--white-gr: #c4c3ca;
--yellow: #ffeba7;
--yellow-2: #f8ab37;
}
body{
color: var(--white-gr);
background-color: var(--dark-blue);
overflow-x: hidden;
}
h1{
font-family: 'Lato', sans-serif;
font-weight: 700;
color: var(--white-gr);
font-size: 36px;
}
.color-yellow {
color: var(--yellow);
}
.size-22 {
font-size: 22px;
}
.logo {
position: absolute;
top: 30px;
right: 30px;
display: block;
z-index: 100;
transition: all 250ms linear;
}
.logo img {
height: 26px;
width: auto;
display: block;
}
.section{
position: relative;
width: 100%;
display: block;
z-index: 2;
}
[type="radio"]:checked,
[type="radio"]:not(:checked){
position: absolute;
left: -9999px;
width: 0;
height: 0;
visibility: hidden;
}
.checkbox-ticket:checked + label,
.checkbox-ticket:not(:checked) + label{
position: relative;
width: 184px;
display: inline-block;
cursor: pointer;
padding: 50px 0;
text-align: center;
margin: 5px;
border-radius: 0;
background-color: transparent;
overflow: hidden;
transition: all 250ms linear;
}
.checkbox-ticket:checked + label:before,
.checkbox-ticket:not(:checked) + label:before{
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: -1;
display: block;
background-image: linear-gradient(335deg, var(--yellow), var(--yellow-2));
}
.checkbox-ticket:not(:checked) + label:after{
content: '';
position: absolute;
top: -100%;
left: 100%;
width: 100%;
height: 100%;
border-radius: 200%;
z-index: -1;
display: block;
background-color: var(--white-gr);
opacity: 0.4;
transition: all 250ms linear;
}
.checkbox-ticket:checked + label:after{
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
border-radius: 0;
z-index: -1;
display: block;
background-color: var(--white-gr);
opacity: 0.4;
transition: all 250ms linear;
}
.checkbox-ticket:checked .........完整代码请登录后点击上方下载按钮下载查看
















网友评论0