what is transform and translate in css code example
Example 1: css rotate
<style>
div {
width: 80px;
height: 80px;
background-color: skyblue;
}
.rotated {
transform: rotate(45deg);
background-color: pink;
}
</style>
/* In body of html doc */
<div>Normal</div>
<div class="rotated">Rotated</div>
Example 2: transform:translateX()
/* <length-percentage> values */
transform: translateX(200px);
transform: translateX(50%);
Example 3: css transform size
.selector {
transform: scale(1.2); // Will upscale to 1.2
}