Jak zresetować CSS3 * - transform: translate(...)?
Jak mam zresetować CSS transforms wcześniej zastosowany?
Powiedz, że mam:
div.someclass {
-webkit-transform: translate3d(0, -50%, 0);
-moz-transform: translate(0, -50%);
-ms-transform: translate(0,- 50%);
-o-transform: translate(0, -50%);
transform: translate3d(0, -50%, 0);
}
Więc jak wyczyścić wszystkie przekształcenia/tłumaczenia?
Czy powinienem używać: translate(0, 0);
/ translate3d(0, 0, 0);
lub transform:auto;
?
51
2 answers
Zgodnie z dokumentacją MDN , wartość początkowa wynosi none
.
Transformację można zresetować używając:
div.someclass {
transform: none;
}
Korzystanie z przedrostka dostawcy:
div.someclass {
-webkit-transform: none; /* Safari and Chrome */
-moz-transform: none; /* Firefox */
-ms-transform: none; /* IE 9 */
-o-transform: none; /* Opera */
transform: none;
}
80
Author: Simone,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2013-04-12 13:01:07
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2013-04-12 13:01:07
W Safari iOS 10.3 i 11.0 i Safari 11 na macOS nie resetował transformacji za pomocą -webkit-transform: none; lub transform: none; Musiałem zamiast tego zresetować wszystkie wartości, które zmieniłem za pomocą właściwości transform, więc zasadniczo myślę, że pierwsza opcja
translate(0, 0); / translate3d(0, 0, 0);
To na razie sposób na kompatybilność przeglądarki. Więc to powinno zadziałać:
-webkit-transform: translate(0, 0) translate3d(0, 0, 0);
-moz-transform: none;
-ms-transform: none;
-o-transform: none;
transform: translate(0, 0) translate3d(0, 0, 0);
1
Author: Brandito,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2017-11-20 22:30:54
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2017-11-20 22:30:54