As a December 28th joke, I would like to temporarily flip my webpage upside down with this code:
body {
transform:rotate(180deg);
-ms-transform:rotate(180deg);
-webkit-transform:rotate(180deg);
}
and I want to put this code javascript for time:
window.setTimeout(function(){ },3000);
How I can adapt the css code?
You can use a class, add the class to the body to perform the transform then remove it after
body.transform {
transform:rotate(180deg);
-ms-transform:rotate(180deg);
-webkit-transform:rotate(180deg);
}
document.body.className = 'transform';
setTimeout(function(){ document.body.className = ''; },3000);