- Dapatkan pautan
- X
- E-mel
- Apl Lain
Ini hanya contoh: Pemberitahuan! ☀ ☁ ☂
Ini hanya contoh: Pemberitahuan! ☀ ☁ ☂
<div class="labu">
<div class="bks">
<div class="gerak">
<div class="gerak_pdr" aria-hidden="true">
<p class="gerak_tls">Ini hanya contoh: Pemberitahuan! ☀ ☁ ☂</p>
</div>
<div class="gerak_trg">
<p class="gerak_tls">Ini hanya contoh: Pemberitahuan! ☀ ☁ ☂</p>
</div>
</div>
</div>
</div>
<style>
.labu *, .labu *::before, .labu *::after {
padding: 0;
margin: 0 auto;
box-sizing: border-box;
}
.labu {
font-family: Sans-serif;
background: Green;
color: #fff;
font-size: 22px;
}
.bks {
padding: 1em 1em;
}
.gerak {
position: relative;
width: 100%;
height: 2em;
font-size: 4em;
display: grid;
place-items: center;
overflow: hidden;
}
.gerak_tls {
position: absolute;
min-width: 100%;
white-space: nowrap;
-webkit-animation: kkiri 20s infinite linear;
animation: kkiri 20s infinite linear;
}
@-webkit-keyframes kkiri {
from {
translate: 80%;
}
to {
translate: -80%;
}
}
@keyframes kkiri {
from {
translate: 80%;
}
to {
translate: -80%;
}
}
.gerak_pdr {
position: absolute;
inset: 0;
display: grid;
place-items: center;
background-color: Green;
background-image: linear-gradient(to right, Black, 1rem, transparent 50%), linear-gradient(to left, Black, 1rem, transparent 50%);
filter: contrast(3);
}
.gerak_pdr p {
filter: blur(0.07em);
}
.gerak_trg {
position: absolute;
inset: 0;
display: grid;
place-items: center;
}
</style>
<div class="bks">
<div class="gerak">
<div class="gerak_pdr" aria-hidden="true">
<p class="gerak_tls">Ini hanya contoh: Pemberitahuan! ☀ ☁ ☂</p>
</div>
<div class="gerak_trg">
<p class="gerak_tls">Ini hanya contoh: Pemberitahuan! ☀ ☁ ☂</p>
</div>
</div>
</div>
</div>
<style>
.labu *, .labu *::before, .labu *::after {
padding: 0;
margin: 0 auto;
box-sizing: border-box;
}
.labu {
font-family: Sans-serif;
background: Green;
color: #fff;
font-size: 22px;
}
.bks {
padding: 1em 1em;
}
.gerak {
position: relative;
width: 100%;
height: 2em;
font-size: 4em;
display: grid;
place-items: center;
overflow: hidden;
}
.gerak_tls {
position: absolute;
min-width: 100%;
white-space: nowrap;
-webkit-animation: kkiri 20s infinite linear;
animation: kkiri 20s infinite linear;
}
@-webkit-keyframes kkiri {
from {
translate: 80%;
}
to {
translate: -80%;
}
}
@keyframes kkiri {
from {
translate: 80%;
}
to {
translate: -80%;
}
}
.gerak_pdr {
position: absolute;
inset: 0;
display: grid;
place-items: center;
background-color: Green;
background-image: linear-gradient(to right, Black, 1rem, transparent 50%), linear-gradient(to left, Black, 1rem, transparent 50%);
filter: contrast(3);
}
.gerak_pdr p {
filter: blur(0.07em);
}
.gerak_trg {
position: absolute;
inset: 0;
display: grid;
place-items: center;
}
</style>
Rujukan CSS di codepen.io/amit_sheen/pen/wvORNYm
Catatan oleh
Orandableg
- Dapatkan pautan
- X
- E-mel
- Apl Lain
Ulasan