Vissza az animációkhoz
Belépő animációk

Fénysepréses megjelenés

Élő előnézet – az animáció teljes méretben.

Élő előnézet
HTML · CSS · JS
HTML
<div class="we-entry-sweep">

    <div class="we-sweep-content">

        <span class="we-entry-label">
            WebElements
        </span>

        <strong>
            Fénnyel feltárt elem
        </strong>

        <small>
            Egyetlen fényív végigvezeti a megjelenést
        </small>

    </div>

    <div class="we-sweep-light"></div>

</div>
CSS
.we-entry-sweep {

    width: 100%;
    max-width: 440px;

    margin: 60px auto;

    position: relative;

    overflow: hidden;

    background: #0b1014;

    border: 1px solid rgba(142,240,213,.22);
    border-radius: 18px;

    color: #f2f4f0;

    font-family: Arial, sans-serif;

    opacity: 0;

    animation:
        weSweepAppear
        .2s
        ease
        .1s
        forwards;
}


.we-sweep-content {

    padding: 38px 40px;

    opacity: 0;

    transform: translateX(-18px);

    animation:
        weSweepContent
        1.1s
        cubic-bezier(.22,1,.36,1)
        .25s
        forwards;
}


.we-sweep-light {

    position: absolute;

    z-index: 5;

    top: -20%;

    left: -25%;

    width: 70px;
    height: 140%;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(142,240,213,.25),
            rgba(255,255,255,.95),
            rgba(142,240,213,.25),
            transparent
        );

    filter: blur(2px);

    transform: rotate(12deg);

    animation:
        weSweepLight
        1.15s
        cubic-bezier(.22,1,.36,1)
        .1s
        forwards;
}


.we-entry-sweep .we-entry-label {

    display: block;

    margin-bottom: 12px;

    color: #8ee8d4;

    font-size: 11px;

    letter-spacing: .18em;

    text-transform: uppercase;
}


.we-entry-sweep strong {

    display: block;

    margin-bottom: 8px;

    font-size: 28px;

    font-weight: 400;
}


.we-entry-sweep small {

    color: #87939a;

    font-size: 13px;
}


@keyframes weSweepAppear {

    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }

}


@keyframes weSweepLight {

    0% {

        left: -25%;

        opacity: 0;

    }

    15% {

        opacity: 1;

    }

    70% {

        opacity: 1;

    }

    100% {

        left: 125%;

        opacity: 0;

    }

}


@keyframes weSweepContent {

    0% {

        opacity: 0;

        transform: translateX(-18px);

    }

    60% {

        opacity: 1;

        transform: translateX(3px);

    }

    100% {

        opacity: 1;

        transform: translateX(0);

    }

}
JavaScript
Ehhez az animációhoz nincs külön JavaScript.