I have tried a CSS code which one of it are include the -webkit code and another didn't but the output are the same. I'm using Google Chrome, but when I delete the transform: rotate(45deg); transform-origin: 20% 40%; the div will not be affect by the webkit, so I don't know why do we need to add this webkit ?
<!DOCTYPE html>
<html>
<head>
<style>
#div1 {
position: relative;
height: 200px;
width: 200px;
margin: 100px;
padding: 10px;
border: 1px solid black;
}
#div2 {
padding: 50px;
position: absolute;
border: 1px solid black;
background-color: red;
/*-webkit-transform: rotate(45deg);*/ /* Safari 3-8 */
/*-webkit-transform-origin: 20% 40%;*/ /* Safari 3-8 */
transform: rotate(45deg);
transform-origin: 20% 40%;
}
</style>
</head>
<body>
<h1> The transform-origin Property</h1>
<div id="div1">
<div id="div2">HELLO</div>
</div>
</body>
</html>