Css :-
button {
outline: 0;
border: 0;
display: flex;
flex-direction: column;
width: 100%;
max-width: 140px;
height: 50px;
border-radius: 0.5em;
box-shadow: 0 0.625em 1em 0 rgba(30, 143, 255, 0.35);
overflow: hidden;
}
button div {
transform: translateY(0px);
width: 100%;
}
button,
button div {
transition: 0.6s cubic-bezier(.16,1,.3,1);
}
button div span {
display: flex;
align-items: center;
justify-content: space-between;
height: 50px;
padding: 0.75em 1.125em;
}
button div:nth-child(1) {
background-color: #1e90ff;
}
button div:nth-child(2) {
background-color: #21dc62;
}
button:hover {
box-shadow: 0 0.625em 1em 0 rgba(33, 220, 98, 0.35);
}
button:hover div {
transform: translateY(-50px);
}
button p {
font-size: 17px;
font-weight: bold;
color: #ffffff;
}
button:active {
transform: scale(0.95);
}
button {
outline: 0;
border: 0;
display: flex;
flex-direction: column;
width: 100%;
max-width: 140px;
height: 50px;
border-radius: 0.5em;
box-shadow: 0 0.625em 1em 0 rgba(30, 143, 255, 0.35);
overflow: hidden;
}
button div {
transform: translateY(0px);
width: 100%;
}
button,
button div {
transition: 0.6s cubic-bezier(.16,1,.3,1);
}
button div span {
display: flex;
align-items: center;
justify-content: space-between;
height: 50px;
padding: 0.75em 1.125em;
}
button div:nth-child(1) {
background-color: #1e90ff;
}
button div:nth-child(2) {
background-color: #21dc62;
}
button:hover {
box-shadow: 0 0.625em 1em 0 rgba(33, 220, 98, 0.35);
}
button:hover div {
transform: translateY(-50px);
}
button p {
font-size: 17px;
font-weight: bold;
color: #ffffff;
}
button:active {
transform: scale(0.95);
}
Html :-
<button class="uiverse">
<div class="wrapper">
<span>Dev_html</span>
<div class="circle circle-12"></div>
<div class="circle circle-11"></div>
<div class="circle circle-10"></div>
<div class="circle circle-9"></div>
<div class="circle circle-8"></div>
<div class="circle circle-7"></div>
<div class="circle circle-6"></div>
<div class="circle circle-5"></div>
<div class="circle circle-4"></div>
<div class="circle circle-3"></div>
<div class="circle circle-2"></div>
<div class="circle circle-1"></div>
</div>
</button>
<button class="uiverse">
<div class="wrapper">
<span>Dev_html</span>
<div class="circle circle-12"></div>
<div class="circle circle-11"></div>
<div class="circle circle-10"></div>
<div class="circle circle-9"></div>
<div class="circle circle-8"></div>
<div class="circle circle-7"></div>
<div class="circle circle-6"></div>
<div class="circle circle-5"></div>
<div class="circle circle-4"></div>
<div class="circle circle-3"></div>
<div class="circle circle-2"></div>
<div class="circle circle-1"></div>
</div>
</button>
Css :-
.uiverse {
--duration: 7s;
--easing: linear;
--c-color-1: rgba(255, 163, 26, .7);
--c-color-2: #1a23ff;
--c-color-3: #e21bda;
--c-color-4: rgba(255, 232, 26, .7);
--c-shadow: rgba(255, 223, 87, .5);
--c-shadow-inset-top: rgba(255, 223, 52, .9);
--c-shadow-inset-bottom: rgba(255, 250, 215, .8);
--c-radial-inner: #ffd215;
--c-radial-outer: #fff172;
--c-color: #fff;
-webkit-tap-highlight-color: transparent;
-webkit-appearance: none;
outline: none;
position: relative;
cursor: pointer;
border: none;
display: table;
border-radius: 24px;
padding: 0;
margin: 0;
text-align: center;
font-weight: 600;
font-size: 16px;
letter-spacing: 0.02em;
line-height: 1.5;
color: var(--c-color);
background: radial-gradient(circle, var(--c-radial-inner), var(--c-radial-outer) 80%);
box-shadow: 0 0 14px var(--c-shadow);
}
.uiverse:before {
content: '';
pointer-events: none;
position: absolute;
z-index: 3;
left: 0;
top: 0;
right: 0;
bottom: 0;
border-radius: 24px;
box-shadow: inset 0 3px 12px var(--c-shadow-inset-top), inset 0 -3px 4px var(--c-shadow-inset-bottom);
}
.uiverse .wrapper {
-webkit-mask-image: -webkit-radial-gradient(white, black);
overflow: hidden;
border-radius: 24px;
min-width: 132px;
padding: 12px 0;
}
.uiverse .wrapper span {
display: inline-block;
position: relative;
z-index: 1;
}
.uiverse .wrapper .circle {
position: absolute;
left: 0;
top: 0;
width: 40px;
height: 40px;
border-radius: 50%;
filter: blur(var(--blur, 8px));
background: var(--background, transparent);
transform: translate(var(--x, 0), var(--y, 0)) translateZ(0);
animation: var(--animation, none) var(--duration) var(--easing) infinite;
}
.uiverse .wrapper .circle.circle-1, .uiverse .wrapper .circle.circle-9, .uiverse .wrapper .circle.circle-10 {
--background: var(--c-color-4);
}
.uiverse .wrapper .circle.circle-3, .uiverse .wrapper .circle.circle-4 {
--background: var(--c-color-2);
--blur: 14px;
}
.uiverse .wrapper .circle.circle-5, .uiverse .wrapper .circle.circle-6 {
--background: var(--c-color-3);
--blur: 16px;
}
.uiverse .wrapper .circle.circle-2, .uiverse .wrapper .circle.circle-7, .uiverse .wrapper .circle.circle-8, .uiverse .wrapper .circle.circle-11, .uiverse .wrapper .circle.circle-12 {
--background: var(--c-color-1);
--blur: 12px;
}
.uiverse .wrapper .circle.circle-1 {
--x: 0;
--y: -40px;
--animation: circle-1;
}
.uiverse .wrapper .circle.circle-2 {
--x: 92px;
--y: 8px;
--animation: circle-2;
}
.uiverse .wrapper .circle.circle-3 {
--x: -12px;
--y: -12px;
--animation: circle-3;
}
.uiverse .wrapper .circle.circle-4 {
--x: 80px;
--y: -12px;
--animation: circle-4;
}
.uiverse .wrapper .circle.circle-5 {
--x: 12px;
--y: -4px;
--animation: circle-5;
}
.uiverse .wrapper .circle.circle-6 {
--x: 56px;
--y: 16px;
--animation: circle-6;
}
.uiverse .wrapper .circle.circle-7 {
--x: 8px;
--y: 28px;
--animation: circle-7;
}
.uiverse .wrapper .circle.circle-8 {
--x: 28px;
--y: -4px;
--animation: circle-8;
}
.uiverse .wrapper .circle.circle-9 {
--x: 20px;
--y: -12px;
--animation: circle-9;
}
.uiverse .wrapper .circle.circle-10 {
--x: 64px;
--y: 16px;
--animation: circle-10;
}
.uiverse .wrapper .circle.circle-11 {
--x: 4px;
--y: 4px;
--animation: circle-11;
}
.uiverse .wrapper .circle.circle-12 {
--blur: 14px;
--x: 52px;
--y: 4px;
--animation: circle-12;
}
@keyframes circle-1 {
33% {
transform: translate(0px, 16px) translateZ(0);
}
66% {
transform: translate(12px, 64px) translateZ(0);
}
}
@keyframes circle-2 {
33% {
transform: translate(80px, -10px) translateZ(0);
}
66% {
transform: translate(72px, -48px) translateZ(0);
}
}
@keyframes circle-3 {
33% {
transform: translate(20px, 12px) translateZ(0);
}
66% {
transform: translate(12px, 4px) translateZ(0);
}
}
@keyframes circle-4 {
33% {
transform: translate(76px, -12px) translateZ(0);
}
.uiverse {
--duration: 7s;
--easing: linear;
--c-color-1: rgba(255, 163, 26, .7);
--c-color-2: #1a23ff;
--c-color-3: #e21bda;
--c-color-4: rgba(255, 232, 26, .7);
--c-shadow: rgba(255, 223, 87, .5);
--c-shadow-inset-top: rgba(255, 223, 52, .9);
--c-shadow-inset-bottom: rgba(255, 250, 215, .8);
--c-radial-inner: #ffd215;
--c-radial-outer: #fff172;
--c-color: #fff;
-webkit-tap-highlight-color: transparent;
-webkit-appearance: none;
outline: none;
position: relative;
cursor: pointer;
border: none;
display: table;
border-radius: 24px;
padding: 0;
margin: 0;
text-align: center;
font-weight: 600;
font-size: 16px;
letter-spacing: 0.02em;
line-height: 1.5;
color: var(--c-color);
background: radial-gradient(circle, var(--c-radial-inner), var(--c-radial-outer) 80%);
box-shadow: 0 0 14px var(--c-shadow);
}
.uiverse:before {
content: '';
pointer-events: none;
position: absolute;
z-index: 3;
left: 0;
top: 0;
right: 0;
bottom: 0;
border-radius: 24px;
box-shadow: inset 0 3px 12px var(--c-shadow-inset-top), inset 0 -3px 4px var(--c-shadow-inset-bottom);
}
.uiverse .wrapper {
-webkit-mask-image: -webkit-radial-gradient(white, black);
overflow: hidden;
border-radius: 24px;
min-width: 132px;
padding: 12px 0;
}
.uiverse .wrapper span {
display: inline-block;
position: relative;
z-index: 1;
}
.uiverse .wrapper .circle {
position: absolute;
left: 0;
top: 0;
width: 40px;
height: 40px;
border-radius: 50%;
filter: blur(var(--blur, 8px));
background: var(--background, transparent);
transform: translate(var(--x, 0), var(--y, 0)) translateZ(0);
animation: var(--animation, none) var(--duration) var(--easing) infinite;
}
.uiverse .wrapper .circle.circle-1, .uiverse .wrapper .circle.circle-9, .uiverse .wrapper .circle.circle-10 {
--background: var(--c-color-4);
}
.uiverse .wrapper .circle.circle-3, .uiverse .wrapper .circle.circle-4 {
--background: var(--c-color-2);
--blur: 14px;
}
.uiverse .wrapper .circle.circle-5, .uiverse .wrapper .circle.circle-6 {
--background: var(--c-color-3);
--blur: 16px;
}
.uiverse .wrapper .circle.circle-2, .uiverse .wrapper .circle.circle-7, .uiverse .wrapper .circle.circle-8, .uiverse .wrapper .circle.circle-11, .uiverse .wrapper .circle.circle-12 {
--background: var(--c-color-1);
--blur: 12px;
}
.uiverse .wrapper .circle.circle-1 {
--x: 0;
--y: -40px;
--animation: circle-1;
}
.uiverse .wrapper .circle.circle-2 {
--x: 92px;
--y: 8px;
--animation: circle-2;
}
.uiverse .wrapper .circle.circle-3 {
--x: -12px;
--y: -12px;
--animation: circle-3;
}
.uiverse .wrapper .circle.circle-4 {
--x: 80px;
--y: -12px;
--animation: circle-4;
}
.uiverse .wrapper .circle.circle-5 {
--x: 12px;
--y: -4px;
--animation: circle-5;
}
.uiverse .wrapper .circle.circle-6 {
--x: 56px;
--y: 16px;
--animation: circle-6;
}
.uiverse .wrapper .circle.circle-7 {
--x: 8px;
--y: 28px;
--animation: circle-7;
}
.uiverse .wrapper .circle.circle-8 {
--x: 28px;
--y: -4px;
--animation: circle-8;
}
.uiverse .wrapper .circle.circle-9 {
--x: 20px;
--y: -12px;
--animation: circle-9;
}
.uiverse .wrapper .circle.circle-10 {
--x: 64px;
--y: 16px;
--animation: circle-10;
}
.uiverse .wrapper .circle.circle-11 {
--x: 4px;
--y: 4px;
--animation: circle-11;
}
.uiverse .wrapper .circle.circle-12 {
--blur: 14px;
--x: 52px;
--y: 4px;
--animation: circle-12;
}
@keyframes circle-1 {
33% {
transform: translate(0px, 16px) translateZ(0);
}
66% {
transform: translate(12px, 64px) translateZ(0);
}
}
@keyframes circle-2 {
33% {
transform: translate(80px, -10px) translateZ(0);
}
66% {
transform: translate(72px, -48px) translateZ(0);
}
}
@keyframes circle-3 {
33% {
transform: translate(20px, 12px) translateZ(0);
}
66% {
transform: translate(12px, 4px) translateZ(0);
}
}
@keyframes circle-4 {
33% {
transform: translate(76px, -12px) translateZ(0);
}
66% {
transform: translate(112px, -8px) translateZ(0);
}
}
@keyframes circle-5 {
33% {
transform: translate(84px, 28px) translateZ(0);
}
66% {
transform: translate(40px, -32px) translateZ(0);
}
}
@keyframes circle-6 {
33% {
transform: translate(28px, -16px) translateZ(0);
}
66% {
transform: translate(76px, -56px) translateZ(0);
}
}
@keyframes circle-7 {
33% {
transform: translate(8px, 28px) translateZ(0);
}
66% {
transform: translate(20px, -60px) translateZ(0);
}
}
@keyframes circle-8 {
33% {
transform: translate(32px, -4px) translateZ(0);
}
66% {
transform: translate(56px, -20px) translateZ(0);
}
}
@keyframes circle-9 {
33% {
transform: translate(20px, -12px) translateZ(0);
}
66% {
transform: translate(80px, -8px) translateZ(0);
}
}
@keyframes circle-10 {
33% {
transform: translate(68px, 20px) translateZ(0);
}
66% {
transform: translate(100px, 28px) translateZ(0);
}
}
@keyframes circle-11 {
33% {
transform: translate(4px, 4px) translateZ(0);
}
66% {
transform: translate(68px, 20px) translateZ(0);
}
}
@keyframes circle-12 {
33% {
transform: translate(56px, 0px) translateZ(0);
}
66% {
transform: translate(60px, -32px) translateZ(0);
}
}
transform: translate(112px, -8px) translateZ(0);
}
}
@keyframes circle-5 {
33% {
transform: translate(84px, 28px) translateZ(0);
}
66% {
transform: translate(40px, -32px) translateZ(0);
}
}
@keyframes circle-6 {
33% {
transform: translate(28px, -16px) translateZ(0);
}
66% {
transform: translate(76px, -56px) translateZ(0);
}
}
@keyframes circle-7 {
33% {
transform: translate(8px, 28px) translateZ(0);
}
66% {
transform: translate(20px, -60px) translateZ(0);
}
}
@keyframes circle-8 {
33% {
transform: translate(32px, -4px) translateZ(0);
}
66% {
transform: translate(56px, -20px) translateZ(0);
}
}
@keyframes circle-9 {
33% {
transform: translate(20px, -12px) translateZ(0);
}
66% {
transform: translate(80px, -8px) translateZ(0);
}
}
@keyframes circle-10 {
33% {
transform: translate(68px, 20px) translateZ(0);
}
66% {
transform: translate(100px, 28px) translateZ(0);
}
}
@keyframes circle-11 {
33% {
transform: translate(4px, 4px) translateZ(0);
}
66% {
transform: translate(68px, 20px) translateZ(0);
}
}
@keyframes circle-12 {
33% {
transform: translate(56px, 0px) translateZ(0);
}
66% {
transform: translate(60px, -32px) translateZ(0);
}
}
Css :-
.custom-loader {
width: 70px;
height: 70px;
background: #ffa600;
border-radius: 50px;
-webkit-mask: radial-gradient(circle 31px at 50% calc(100% + 13px),#000 95%,#0000) top 4px left 50%,
radial-gradient(circle 31px,#000 95%,#0000) center,
radial-gradient(circle 31px at 50% -13px,#000 95%,#0000) bottom 4px left 50%,
linear-gradient(#000 0 0);
-webkit-mask-composite: xor;
mask-composite: exclude;
-webkit-mask-repeat: no-repeat;
animation: cu10 1.5s infinite;
}
@keyframes cu10 {
0% {
-webkit-mask-size: 0 18px,0 18px,0 18px,auto
}
16.67% {
-webkit-mask-size: 100% 18px,0 18px,0 18px,auto
}
33.33% {
-webkit-mask-size: 100% 18px,100% 18px,0 18px,auto
}
50% {
-webkit-mask-size: 100% 18px,100% 18px,100% 18px,auto
}
66.67% {
-webkit-mask-size: 0 18px,100% 18px,100% 18px,auto
}
83.33% {
-webkit-mask-size: 0 18px,0 18px,100% 18px,auto
}
100% {
-webkit-mask-size: 0 18px,0 18px,0 18px,auto
}
}
.custom-loader {
width: 70px;
height: 70px;
background: #ffa600;
border-radius: 50px;
-webkit-mask: radial-gradient(circle 31px at 50% calc(100% + 13px),#000 95%,#0000) top 4px left 50%,
radial-gradient(circle 31px,#000 95%,#0000) center,
radial-gradient(circle 31px at 50% -13px,#000 95%,#0000) bottom 4px left 50%,
linear-gradient(#000 0 0);
-webkit-mask-composite: xor;
mask-composite: exclude;
-webkit-mask-repeat: no-repeat;
animation: cu10 1.5s infinite;
}
@keyframes cu10 {
0% {
-webkit-mask-size: 0 18px,0 18px,0 18px,auto
}
16.67% {
-webkit-mask-size: 100% 18px,0 18px,0 18px,auto
}
33.33% {
-webkit-mask-size: 100% 18px,100% 18px,0 18px,auto
}
50% {
-webkit-mask-size: 100% 18px,100% 18px,100% 18px,auto
}
66.67% {
-webkit-mask-size: 0 18px,100% 18px,100% 18px,auto
}
83.33% {
-webkit-mask-size: 0 18px,0 18px,100% 18px,auto
}
100% {
-webkit-mask-size: 0 18px,0 18px,0 18px,auto
}
}
👍3
Html :-
<button class="bookmarkBtn">
<span class="IconContainer">
<svg viewBox="0 0 384 512" height="0.9em" class="icon"><path d="M0 48V487.7C0 501.1 10.9 512 24.3 512c5 0 9.9-1.5 14-4.4L192 400 345.7 507.6c4.1 2.9 9 4.4 14 4.4c13.4 0 24.3-10.9 24.3-24.3V48c0-26.5-21.5-48-48-48H48C21.5 0 0 21.5 0 48z"></path></svg>
</span>
<p class="text">Save</p>
</button>
<button class="bookmarkBtn">
<span class="IconContainer">
<svg viewBox="0 0 384 512" height="0.9em" class="icon"><path d="M0 48V487.7C0 501.1 10.9 512 24.3 512c5 0 9.9-1.5 14-4.4L192 400 345.7 507.6c4.1 2.9 9 4.4 14 4.4c13.4 0 24.3-10.9 24.3-24.3V48c0-26.5-21.5-48-48-48H48C21.5 0 0 21.5 0 48z"></path></svg>
</span>
<p class="text">Save</p>
</button>
Css :-
.bookmarkBtn {
width: 100px;
height: 40px;
border-radius: 40px;
border: 1px solid rgba(255, 255, 255, 0.349);
background-color: rgb(12, 12, 12);
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
transition-duration: .3s;
overflow: hidden;
}
.IconContainer {
width: 30px;
height: 30px;
background: linear-gradient(to bottom, rgb(255, 136, 255),rgb(172, 70, 255));
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
overflow: hidden;
z-index: 2;
transition-duration: .3s;
}
.icon {
border-radius: 1px;
}
.text {
height: 100%;
width: 60px;
display: flex;
align-items: center;
justify-content: center;
color: white;
z-index: 1;
transition-duration: .3s;
font-size: 1.04em;
}
.bookmarkBtn:hover .IconContainer {
width: 90px;
border-radius: 40px;
transition-duration: .3s;
}
.bookmarkBtn:hover .text {
transform: translate(10px);
width: 0;
font-size: 0;
transition-duration: .3s;
}
.bookmarkBtn:active {
transform: scale(0.95);
transition-duration: .3s;
}
.bookmarkBtn {
width: 100px;
height: 40px;
border-radius: 40px;
border: 1px solid rgba(255, 255, 255, 0.349);
background-color: rgb(12, 12, 12);
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
transition-duration: .3s;
overflow: hidden;
}
.IconContainer {
width: 30px;
height: 30px;
background: linear-gradient(to bottom, rgb(255, 136, 255),rgb(172, 70, 255));
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
overflow: hidden;
z-index: 2;
transition-duration: .3s;
}
.icon {
border-radius: 1px;
}
.text {
height: 100%;
width: 60px;
display: flex;
align-items: center;
justify-content: center;
color: white;
z-index: 1;
transition-duration: .3s;
font-size: 1.04em;
}
.bookmarkBtn:hover .IconContainer {
width: 90px;
border-radius: 40px;
transition-duration: .3s;
}
.bookmarkBtn:hover .text {
transform: translate(10px);
width: 0;
font-size: 0;
transition-duration: .3s;
}
.bookmarkBtn:active {
transform: scale(0.95);
transition-duration: .3s;
}
Css :-
.button {
cursor: pointer;
position: relative;
padding: 10px 24px;
font-size: 18px;
color: rgb(193, 163, 98);
border: 2px solid rgb(193, 163, 98);
border-radius: 34px;
background-color: transparent;
font-weight: 600;
transition: all 0.3s cubic-bezier(0.23, 1, 0.320, 1);
overflow: hidden;
}
.button::before {
content: '';
position: absolute;
inset: 0;
margin: auto;
width: 50px;
height: 50px;
border-radius: inherit;
scale: 0;
z-index: -1;
background-color: rgb(193, 163, 98);
transition: all 0.6s cubic-bezier(0.23, 1, 0.320, 1);
}
.button:hover::before {
scale: 3;
}
.button:hover {
color: #212121;
scale: 1.1;
box-shadow: 0 0px 20px rgba(193, 163, 98,0.4);
}
.button:active {
scale: 1;
}
.button {
cursor: pointer;
position: relative;
padding: 10px 24px;
font-size: 18px;
color: rgb(193, 163, 98);
border: 2px solid rgb(193, 163, 98);
border-radius: 34px;
background-color: transparent;
font-weight: 600;
transition: all 0.3s cubic-bezier(0.23, 1, 0.320, 1);
overflow: hidden;
}
.button::before {
content: '';
position: absolute;
inset: 0;
margin: auto;
width: 50px;
height: 50px;
border-radius: inherit;
scale: 0;
z-index: -1;
background-color: rgb(193, 163, 98);
transition: all 0.6s cubic-bezier(0.23, 1, 0.320, 1);
}
.button:hover::before {
scale: 3;
}
.button:hover {
color: #212121;
scale: 1.1;
box-shadow: 0 0px 20px rgba(193, 163, 98,0.4);
}
.button:active {
scale: 1;
}
Html :-
<div class="checkbox-wrapper-12">
<div class="cbx">
<input id="cbx-12" type="checkbox">
<label for="cbx-12"></label>
<svg width="15" height="14" viewBox="0 0 15 14" fill="none">
<path d="M2 8.36364L6.23077 12L13 2"></path>
</svg>
</div>
<svg xmlns="http://www.w3.org/2000/svg" version="1.1">
<defs>
<filter id="goo-12">
<feGaussianBlur in="SourceGraphic" stdDeviation="4" result="blur"></feGaussianBlur>
<feColorMatrix in="blur" mode="matrix" values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 22 -7" result="goo-12"></feColorMatrix>
<feBlend in="SourceGraphic" in2="goo-12"></feBlend>
</filter>
</defs>
</svg>
</div>
<div class="checkbox-wrapper-12">
<div class="cbx">
<input id="cbx-12" type="checkbox">
<label for="cbx-12"></label>
<svg width="15" height="14" viewBox="0 0 15 14" fill="none">
<path d="M2 8.36364L6.23077 12L13 2"></path>
</svg>
</div>
<svg xmlns="http://www.w3.org/2000/svg" version="1.1">
<defs>
<filter id="goo-12">
<feGaussianBlur in="SourceGraphic" stdDeviation="4" result="blur"></feGaussianBlur>
<feColorMatrix in="blur" mode="matrix" values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 22 -7" result="goo-12"></feColorMatrix>
<feBlend in="SourceGraphic" in2="goo-12"></feBlend>
</filter>
</defs>
</svg>
</div>
Css :-
.checkbox-wrapper-12 {
position: relative;
}
.checkbox-wrapper-12 > svg {
position: absolute;
top: -130%;
left: -170%;
width: 110px;
pointer-events: none;
}
.checkbox-wrapper-12 * {
box-sizing: border-box;
}
.checkbox-wrapper-12 input[type="checkbox"] {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
-webkit-tap-highlight-color: transparent;
cursor: pointer;
margin: 0;
}
.checkbox-wrapper-12 input[type="checkbox"]:focus {
outline: 0;
}
.checkbox-wrapper-12 .cbx {
width: 24px;
height: 24px;
top: calc(100px - 12px);
left: calc(100px - 12px);
}
.checkbox-wrapper-12 .cbx input {
position: absolute;
top: 0;
left: 0;
width: 24px;
height: 24px;
border: 2px solid #bfbfc0;
border-radius: 50%;
}
.checkbox-wrapper-12 .cbx label {
width: 24px;
height: 24px;
background: none;
border-radius: 50%;
position: absolute;
top: 0;
left: 0;
transform: trasnlate3d(0, 0, 0);
pointer-events: none;
}
.checkbox-wrapper-12 .cbx svg {
position: absolute;
top: 5px;
left: 4px;
z-index: 1;
pointer-events: none;
}
.checkbox-wrapper-12 .cbx svg path {
stroke: #fff;
stroke-width: 3;
stroke-linecap: round;
stroke-linejoin: round;
stroke-dasharray: 19;
stroke-dashoffset: 19;
transition: stroke-dashoffset 0.3s ease;
transition-delay: 0.2s;
}
.checkbox-wrapper-12 .cbx input:checked + label {
animation: splash-12 0.6s ease forwards;
}
.checkbox-wrapper-12 .cbx input:checked + label + svg path {
stroke-dashoffset: 0;
}
@-moz-keyframes splash-12 {
40% {
background: #866efb;
box-shadow: 0 -18px 0 -8px #866efb, 16px -8px 0 -8px #866efb, 16px 8px 0 -8px #866efb, 0 18px 0 -8px #866efb, -16px 8px 0 -8px #866efb, -16px -8px 0 -8px #866efb;
}
100% {
background: #866efb;
box-shadow: 0 -36px 0 -10px transparent, 32px -16px 0 -10px transparent, 32px 16px 0 -10px transparent, 0 36px 0 -10px transparent, -32px 16px 0 -10px transparent, -32px -16px 0 -10px transparent;
}
}
@-webkit-keyframes splash-12 {
40% {
background: #866efb;
box-shadow: 0 -18px 0 -8px #866efb, 16px -8px 0 -8px #866efb, 16px 8px 0 -8px #866efb, 0 18px 0 -8px #866efb, -16px 8px 0 -8px #866efb, -16px -8px 0 -8px #866efb;
}
100% {
background: #866efb;
box-shadow: 0 -36px 0 -10px transparent, 32px -16px 0 -10px transparent, 32px 16px 0 -10px transparent, 0 36px 0 -10px transparent, -32px 16px 0 -10px transparent, -32px -16px 0 -10px transparent;
}
}
@-o-keyframes splash-12 {
40% {
background: #866efb;
box-shadow: 0 -18px 0 -8px #866efb, 16px -8px 0 -8px #866efb, 16px 8px 0 -8px #866efb, 0 18px 0 -8px #866efb, -16px 8px 0 -8px #866efb, -16px -8px 0 -8px #866efb;
}
100% {
background: #866efb;
box-shadow: 0 -36px 0 -10px transparent, 32px -16px 0 -10px transparent, 32px 16px 0 -10px transparent, 0 36px 0 -10px transparent, -32px 16px 0 -10px transparent, -32px -16px 0 -10px transparent;
}
}
@keyframes splash-12 {
40% {
background: #866efb;
box-shadow: 0 -18px 0 -8px #866efb, 16px -8px 0 -8px #866efb, 16px 8px 0 -8px #866efb, 0 18px 0 -8px #866efb, -16px 8px 0 -8px #866efb, -16px -8px 0 -8px #866efb;
}
100% {
background: #866efb;
box-shadow: 0 -36px 0 -10px transparent, 32px -16px 0 -10px transparent, 32px 16px 0 -10px transparent, 0 36px 0 -10px transparent, -32px 16px 0 -10px transparent, -32px -16px 0 -10px transparent;
}
}
.checkbox-wrapper-12 {
position: relative;
}
.checkbox-wrapper-12 > svg {
position: absolute;
top: -130%;
left: -170%;
width: 110px;
pointer-events: none;
}
.checkbox-wrapper-12 * {
box-sizing: border-box;
}
.checkbox-wrapper-12 input[type="checkbox"] {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
-webkit-tap-highlight-color: transparent;
cursor: pointer;
margin: 0;
}
.checkbox-wrapper-12 input[type="checkbox"]:focus {
outline: 0;
}
.checkbox-wrapper-12 .cbx {
width: 24px;
height: 24px;
top: calc(100px - 12px);
left: calc(100px - 12px);
}
.checkbox-wrapper-12 .cbx input {
position: absolute;
top: 0;
left: 0;
width: 24px;
height: 24px;
border: 2px solid #bfbfc0;
border-radius: 50%;
}
.checkbox-wrapper-12 .cbx label {
width: 24px;
height: 24px;
background: none;
border-radius: 50%;
position: absolute;
top: 0;
left: 0;
transform: trasnlate3d(0, 0, 0);
pointer-events: none;
}
.checkbox-wrapper-12 .cbx svg {
position: absolute;
top: 5px;
left: 4px;
z-index: 1;
pointer-events: none;
}
.checkbox-wrapper-12 .cbx svg path {
stroke: #fff;
stroke-width: 3;
stroke-linecap: round;
stroke-linejoin: round;
stroke-dasharray: 19;
stroke-dashoffset: 19;
transition: stroke-dashoffset 0.3s ease;
transition-delay: 0.2s;
}
.checkbox-wrapper-12 .cbx input:checked + label {
animation: splash-12 0.6s ease forwards;
}
.checkbox-wrapper-12 .cbx input:checked + label + svg path {
stroke-dashoffset: 0;
}
@-moz-keyframes splash-12 {
40% {
background: #866efb;
box-shadow: 0 -18px 0 -8px #866efb, 16px -8px 0 -8px #866efb, 16px 8px 0 -8px #866efb, 0 18px 0 -8px #866efb, -16px 8px 0 -8px #866efb, -16px -8px 0 -8px #866efb;
}
100% {
background: #866efb;
box-shadow: 0 -36px 0 -10px transparent, 32px -16px 0 -10px transparent, 32px 16px 0 -10px transparent, 0 36px 0 -10px transparent, -32px 16px 0 -10px transparent, -32px -16px 0 -10px transparent;
}
}
@-webkit-keyframes splash-12 {
40% {
background: #866efb;
box-shadow: 0 -18px 0 -8px #866efb, 16px -8px 0 -8px #866efb, 16px 8px 0 -8px #866efb, 0 18px 0 -8px #866efb, -16px 8px 0 -8px #866efb, -16px -8px 0 -8px #866efb;
}
100% {
background: #866efb;
box-shadow: 0 -36px 0 -10px transparent, 32px -16px 0 -10px transparent, 32px 16px 0 -10px transparent, 0 36px 0 -10px transparent, -32px 16px 0 -10px transparent, -32px -16px 0 -10px transparent;
}
}
@-o-keyframes splash-12 {
40% {
background: #866efb;
box-shadow: 0 -18px 0 -8px #866efb, 16px -8px 0 -8px #866efb, 16px 8px 0 -8px #866efb, 0 18px 0 -8px #866efb, -16px 8px 0 -8px #866efb, -16px -8px 0 -8px #866efb;
}
100% {
background: #866efb;
box-shadow: 0 -36px 0 -10px transparent, 32px -16px 0 -10px transparent, 32px 16px 0 -10px transparent, 0 36px 0 -10px transparent, -32px 16px 0 -10px transparent, -32px -16px 0 -10px transparent;
}
}
@keyframes splash-12 {
40% {
background: #866efb;
box-shadow: 0 -18px 0 -8px #866efb, 16px -8px 0 -8px #866efb, 16px 8px 0 -8px #866efb, 0 18px 0 -8px #866efb, -16px 8px 0 -8px #866efb, -16px -8px 0 -8px #866efb;
}
100% {
background: #866efb;
box-shadow: 0 -36px 0 -10px transparent, 32px -16px 0 -10px transparent, 32px 16px 0 -10px transparent, 0 36px 0 -10px transparent, -32px 16px 0 -10px transparent, -32px -16px 0 -10px transparent;
}
}
Html :-
<div class="newtons-cradle">
<div class="newtons-cradle__dot"></div>
<div class="newtons-cradle__dot"></div>
<div class="newtons-cradle__dot"></div>
<div class="newtons-cradle__dot"></div>
</div>
<div class="newtons-cradle">
<div class="newtons-cradle__dot"></div>
<div class="newtons-cradle__dot"></div>
<div class="newtons-cradle__dot"></div>
<div class="newtons-cradle__dot"></div>
</div>
Css :-
.newtons-cradle {
--uib-size: 50px;
--uib-speed: 1.2s;
--uib-color: #474554;
position: relative;
display: flex;
align-items: center;
justify-content: center;
width: var(--uib-size);
height: var(--uib-size);
}
.newtons-cradle__dot {
position: relative;
display: flex;
align-items: center;
height: 100%;
width: 25%;
transform-origin: center top;
}
.newtons-cradle__dot::after {
content: '';
display: block;
width: 100%;
height: 25%;
border-radius: 50%;
background-color: var(--uib-color);
}
.newtons-cradle__dot:first-child {
animation: swing var(--uib-speed) linear infinite;
}
.newtons-cradle__dot:last-child {
animation: swing2 var(--uib-speed) linear infinite;
}
@keyframes swing {
0% {
transform: rotate(0deg);
animation-timing-function: ease-out;
}
25% {
transform: rotate(70deg);
animation-timing-function: ease-in;
}
50% {
transform: rotate(0deg);
animation-timing-function: linear;
}
}
@keyframes swing2 {
0% {
transform: rotate(0deg);
animation-timing-function: linear;
}
50% {
transform: rotate(0deg);
animation-timing-function: ease-out;
}
75% {
transform: rotate(-70deg);
animation-timing-function: ease-in;
}
}
.newtons-cradle {
--uib-size: 50px;
--uib-speed: 1.2s;
--uib-color: #474554;
position: relative;
display: flex;
align-items: center;
justify-content: center;
width: var(--uib-size);
height: var(--uib-size);
}
.newtons-cradle__dot {
position: relative;
display: flex;
align-items: center;
height: 100%;
width: 25%;
transform-origin: center top;
}
.newtons-cradle__dot::after {
content: '';
display: block;
width: 100%;
height: 25%;
border-radius: 50%;
background-color: var(--uib-color);
}
.newtons-cradle__dot:first-child {
animation: swing var(--uib-speed) linear infinite;
}
.newtons-cradle__dot:last-child {
animation: swing2 var(--uib-speed) linear infinite;
}
@keyframes swing {
0% {
transform: rotate(0deg);
animation-timing-function: ease-out;
}
25% {
transform: rotate(70deg);
animation-timing-function: ease-in;
}
50% {
transform: rotate(0deg);
animation-timing-function: linear;
}
}
@keyframes swing2 {
0% {
transform: rotate(0deg);
animation-timing-function: linear;
}
50% {
transform: rotate(0deg);
animation-timing-function: ease-out;
}
75% {
transform: rotate(-70deg);
animation-timing-function: ease-in;
}
}
👍1