Page Widget How to - Position background image in diagonal








Question

We would like to know how to position background image in diagonal.

Answer


<!DOCTYPE html>
<html>
<head>
<style type='text/css'>
.fullimg:before {<!--from ww  w  . j  a v  a2s .  c o m-->
  content: "";
  position: absolute;
  -webkit-transform: rotate(15deg);
  width: 100%;
  height: 100%;
  background-image: url(http://www.java2s.com/style/download.png);
}
</style>
</head>
<body class="fullimg">
</body>
</html>

The code above is rendered as follows: