If I have a div with a few child elements and it's being css transform scaled. I've got one child element which I don't want to scale
Can this be done with css only? Without changing the html or using js.
Unfortunately this is not possible.
You roughly have two other options though:
Examples:
// Example 1.
span:not(:last-child) {
display: inline-block; /* You can't scale inline elements */
transform: scale(2);
}
// Example 2.
#parent{
transform: scale(.5);
}
span:last-child{
transform: scale(2);
}