- Dapatkan pautan
- X
- E-mel
- Apl Lain
Seronok nampaknya, melompat-lompat.
Demo
riang
HTML view ▼
<div style="border-radius: 12px; height: 400px; overflow: hidden; position: relative;"><div class="labu"><hj>
<bhl>k</bhl>
<bhl>a</bhl>
<bhl>n</bhl>
<bhl>a</bhl>
<bhl>k</bhl>
<br />
<bhl>k</bhl>
<bhl>a</bhl>
<bhl>n</bhl>
<bhl>a</bhl>
<bhl>k</bhl>
<br /><br />
<div class="labi">riang</div>
</hj></div>
</div>
<style>
.labu {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
width: 100%;
height: 100%;
background-color: skyblue;
background-image: -webkit-linear-gradient(90deg, skyblue 0%, steelblue 100%);
background-attachment: fixed;
background-size: 100% 100%;
overflow: hidden;
font-family: trebuchet;
-webkit-font-smoothing: antialiased;
}
.labu:before {
content: "";
position: absolute;
top: 0;
left: 0;
right: 0;
width: 0;
height: 0;
margin: auto;
border-radius: 100%;
background: transparent;
display: block;
box-shadow: 0 0 150px 100px rgba(255, 255, 255, 0.6),
200px 0 200px 150px rgba(255, 255, 255, 0.6),
-250px 0 300px 150px rgba(255, 255, 255, 0.6),
550px 0 300px 200px rgba(255, 255, 255, 0.6),
-550px 0 300px 200px rgba(255, 255, 255, 0.6);
}
.labi {
position: relative;
top: 20px;
display: inline-block;
font-size: 80px;
color: green;
text-shadow: 0 1px 0 #ccc, 0 2px 0 #ccc, 0 3px 0 #ccc, 0 4px 0 #ccc,
0 5px 0 #ccc, 0 6px 0 transparent, 0 7px 0 transparent, 0 8px 0 transparent,
0 9px 0 transparent, 0 10px 10px rgba(0, 0, 0, 0.4);
}
hj {
cursor: default;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
width: 100%;
height: 100px;
font-weight: bold;
margin: auto;
display: block;
text-align: center;
}
hj bhl {
position: relative;
top: 20px;
display: inline-block;
-webkit-animation: bounce 0.3s ease infinite alternate;
font-size: 80px;
color: #fff;
text-shadow: 0 1px 0 #ccc, 0 2px 0 #ccc, 0 3px 0 #ccc, 0 4px 0 #ccc,
0 5px 0 #ccc, 0 6px 0 transparent, 0 7px 0 transparent, 0 8px 0 transparent,
0 9px 0 transparent, 0 10px 10px rgba(0, 0, 0, 0.4);
}
hj bhl:nth-child(2) {
-webkit-animation-delay: 0.1s;
}
hj bhl:nth-child(3) {
-webkit-animation-delay: 0.2s;
}
hj bhl:nth-child(4) {
-webkit-animation-delay: 0.3s;
}
hj bhl:nth-child(5) {
-webkit-animation-delay: 0.4s;
}
hj bhl:nth-child(6) {
-webkit-animation-delay: 0.1s;
}
hj bhl:nth-child(7) {
-webkit-animation-delay: 0.6s;
}
hj bhl:nth-child(8) {
-webkit-animation-delay: 0.2s;
}
hj bhl:nth-child(9) {
-webkit-animation-delay: 0.3s;
}
hj bhl:nth-child(10) {
-webkit-animation-delay: 0.4s;
}
@-webkit-keyframes bounce {
100% {
top: -20px;
text-shadow: 0 1px 0 #ccc, 0 2px 0 #ccc, 0 3px 0 #ccc, 0 4px 0 #ccc,
0 5px 0 #ccc, 0 6px 0 #ccc, 0 7px 0 #ccc, 0 8px 0 #ccc, 0 9px 0 #ccc,
0 50px 25px rgba(0, 0, 0, 0.2);
}
}
</style>
<bhl>k</bhl>
<bhl>a</bhl>
<bhl>n</bhl>
<bhl>a</bhl>
<bhl>k</bhl>
<br />
<bhl>k</bhl>
<bhl>a</bhl>
<bhl>n</bhl>
<bhl>a</bhl>
<bhl>k</bhl>
<br /><br />
<div class="labi">riang</div>
</hj></div>
</div>
<style>
.labu {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
width: 100%;
height: 100%;
background-color: skyblue;
background-image: -webkit-linear-gradient(90deg, skyblue 0%, steelblue 100%);
background-attachment: fixed;
background-size: 100% 100%;
overflow: hidden;
font-family: trebuchet;
-webkit-font-smoothing: antialiased;
}
.labu:before {
content: "";
position: absolute;
top: 0;
left: 0;
right: 0;
width: 0;
height: 0;
margin: auto;
border-radius: 100%;
background: transparent;
display: block;
box-shadow: 0 0 150px 100px rgba(255, 255, 255, 0.6),
200px 0 200px 150px rgba(255, 255, 255, 0.6),
-250px 0 300px 150px rgba(255, 255, 255, 0.6),
550px 0 300px 200px rgba(255, 255, 255, 0.6),
-550px 0 300px 200px rgba(255, 255, 255, 0.6);
}
.labi {
position: relative;
top: 20px;
display: inline-block;
font-size: 80px;
color: green;
text-shadow: 0 1px 0 #ccc, 0 2px 0 #ccc, 0 3px 0 #ccc, 0 4px 0 #ccc,
0 5px 0 #ccc, 0 6px 0 transparent, 0 7px 0 transparent, 0 8px 0 transparent,
0 9px 0 transparent, 0 10px 10px rgba(0, 0, 0, 0.4);
}
hj {
cursor: default;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
width: 100%;
height: 100px;
font-weight: bold;
margin: auto;
display: block;
text-align: center;
}
hj bhl {
position: relative;
top: 20px;
display: inline-block;
-webkit-animation: bounce 0.3s ease infinite alternate;
font-size: 80px;
color: #fff;
text-shadow: 0 1px 0 #ccc, 0 2px 0 #ccc, 0 3px 0 #ccc, 0 4px 0 #ccc,
0 5px 0 #ccc, 0 6px 0 transparent, 0 7px 0 transparent, 0 8px 0 transparent,
0 9px 0 transparent, 0 10px 10px rgba(0, 0, 0, 0.4);
}
hj bhl:nth-child(2) {
-webkit-animation-delay: 0.1s;
}
hj bhl:nth-child(3) {
-webkit-animation-delay: 0.2s;
}
hj bhl:nth-child(4) {
-webkit-animation-delay: 0.3s;
}
hj bhl:nth-child(5) {
-webkit-animation-delay: 0.4s;
}
hj bhl:nth-child(6) {
-webkit-animation-delay: 0.1s;
}
hj bhl:nth-child(7) {
-webkit-animation-delay: 0.6s;
}
hj bhl:nth-child(8) {
-webkit-animation-delay: 0.2s;
}
hj bhl:nth-child(9) {
-webkit-animation-delay: 0.3s;
}
hj bhl:nth-child(10) {
-webkit-animation-delay: 0.4s;
}
@-webkit-keyframes bounce {
100% {
top: -20px;
text-shadow: 0 1px 0 #ccc, 0 2px 0 #ccc, 0 3px 0 #ccc, 0 4px 0 #ccc,
0 5px 0 #ccc, 0 6px 0 #ccc, 0 7px 0 #ccc, 0 8px 0 #ccc, 0 9px 0 #ccc,
0 50px 25px rgba(0, 0, 0, 0.2);
}
}
</style>
CSS disesuaikan untuk paparan di blog ini, dipetik dari codepen
Ulasan