You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

185 lines
4.7 KiB

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style>
/* From Uiverse.io by Madflows */
.button {
position: relative;
overflow: hidden;
width: 100px;
height: 30px;
padding: 0 2rem;
border-radius: 1.5rem;
background: #3d3a4e;
background-size: 400%;
color: #fff;
border: none;
cursor: pointer;
}
.button:hover::before {
transform: scaleX(1);
}
.button-content {
position: relative;
z-index: 1;
}
.button::before {
content: "";
position: absolute;
top: 0;
left: 0;
transform: scaleX(0);
transform-origin: 0 50%;
width: 100%;
height: inherit;
border-radius: inherit;
background: linear-gradient(82.3deg,
rgba(150, 93, 233, 1) 10.8%,
rgba(99, 88, 238, 1) 94.3%);
transition: all 0.475s;
}
/* From Uiverse.io by elijahgummer */
/* Hide the default checkbox */
.container input {
display: flex;
align-items: center;
justify-content: center;
position: absolute;
opacity: 0;
cursor: pointer;
height: 0;
width: 0;
}
.container {
display: block;
position: relative;
cursor: pointer;
font-size: 20px;
user-select: none;
border: 3px solid #beddd0;
border-radius: 10px;
overflow: hidden;
}
/* Create a custom checkbox */
.checkmark {
position: relative;
top: 0;
left: 0;
height: 1.3em;
width: 1.3em;
background-color: #2dc38c;
border-bottom: 1.5px solid #2dc38c;
/* Bottom stroke */
box-shadow: 0 0 1px #cef1e4, inset 0 -2.5px 3px #62eab8,
inset 0 3px 3px rgba(0, 0, 0, 0.34);
/* Inner shadow */
border-radius: 8px;
transition: transform 0.3s ease-in-out;
/* Transition for smooth animation */
}
/* When the checkbox is checked, modify the checkmark appearance */
.container input:checked~.checkmark {
transform: translateY(40px);
/* Move down */
animation: wipeDown 0.6s ease-in-out forwards;
/* Apply wipe animation */
}
/* When the checkbox is not checked, modify the checkmark appearance */
.container input:not(:checked)~.checkmark {
transform: translateY(-40px);
/* Move up */
animation: wipeUp 0.6s ease-in-out forwards;
/* Apply wipe animation */
}
/* Keyframes for wipe animations */
@keyframes wipeDown {
0% {
transform: translateY(0);
/* Starting position */
}
100% {
transform: translateY(40px);
/* End position */
}
}
@keyframes wipeUp {
0% {
transform: translateY(40);
/* Starting position */
}
100% {
transform: translateY(0px);
/* End position */
}
}
/* Create the checkmark/indicator */
.checkmark:after {
content: "";
position: absolute;
display: none;
}
/* Show the checkmark when checked */
.container input:checked~.checkmark:after {
display: block;
}
/* Style the checkmark/indicator */
.container .checkmark:before {
content: "";
position: absolute;
left: 10px;
top: 4px;
width: 5px;
height: 10px;
border: solid white;
border-width: 0 2px 2px 0;
transform: rotate(45deg);
box-shadow: 0 4px 2px rgba(0, 0, 0, 0.34);
/* Icon drop shadow */
}
</style>
</head>
<body>
<button class="button">
<span class="button-content">下载</span>
</button>
<button class="button">
<span class="button-content">下载</span>
</button>
<button class="button">
<span class="button-conetne">下载</span>
</button>
</body>
</html>