Is there any way to set style transform: translateX(100px) translateY(200px) rotate(100deg) scale(1.5)
on multiple places? For example, there are these lines in CSS:
.translate-x {
transform: translateX(100px);
}
.translate-y {
transform: translateY(200px);
}
.rotate {
transform: rotate(100deg)
}
.big {
transform: scale(1.5);
}
And then, I would like use these classes in HTML to combine transform
.
<div class="translate-x rotate big"></div>
<div class="translate-y big"></div>
...
The problem is that the styles do not combine, but the last one will overwrite the others.
Only way what I know is combine all classes. But there are many combinations...
.translate-x.translate-y {
transform: translateX(100px) translateY(200px);
}
.translate-x.translate.y.big {
transform: translateX(100px) translateY(200px) scale(1.5);
}
...