Transform

TO
TO
  • Rejestracja:około 10 lat
  • Ostatnio:około 2 lata
  • Postów:72
0

Która wersja jest poprawna?

Kopiuj
1.

.div {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        transition: transform .3s ease;
        will-change: transform;
    }

.active {
        transform: translatex(-100%);
    }
Kopiuj
2.

.div {
        position: fixed;
        top: 0;
        right: 100%;
        width: 100%;
        transform: translatex(-100%);
        transition: transform .3s ease;
        will-change: transform;
    }

.active {
        transform: translatex(0px);
    }
Freja Draco
Freja Draco
  • Rejestracja:około 7 lat
  • Ostatnio:ponad 3 lata
  • Postów:3394
0

Jeśli działa, jak oczekujesz, to obie.
Da się to zrobić jeszcze na kilka innych sposobów.


Zarejestruj się i dołącz do największej społeczności programistów w Polsce.

Otrzymaj wsparcie, dziel się wiedzą i rozwijaj swoje umiejętności z najlepszymi.