After experimenting with a CSS code that includes the -webkit property and another one that doesn't, I noticed that both produce the same output. I am using Google Chrome, and when I remove the transform: rotate(45deg); transform-origin: 20% 40%; properties, the webkit does not affect the div. This makes me wonder why we need to include the webkit at all?
<!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>