jQuery Style How to - Rotate body to turn web page upside down








Question

We would like to know how to rotate body to turn web page upside down.

Answer


<!DOCTYPE html>
<html>
<head>
<script type='text/javascript'
  src='http://code.jquery.com/jquery-1.8.3.js'></script>
<script type='text/javascript'>//<![CDATA[ 
$(window).load(function(){<!--from   w  w w  .  ja  v  a 2 s. co m-->
    $('body').css('transform', 'rotate(180deg)');
});//]]>  
</script>
</head>
<body>  Hello world!
</body>
</html>

The code above is rendered as follows: