Transform

0

Która wersja jest poprawna?

1.

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

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

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

.active {
        transform: translatex(0px);
    }
0

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

1 użytkowników online, w tym zalogowanych: 0, gości: 1