I'm trying to shift an element to the left by using transform
. However, there is already an existing property on the style transform
which looks like this: transform: translate3d(tx, ty, tz)
What I want to do is in addition of the translate3d(tx, ty, tz)
, I want to add another property called translateX(tx)
. So the whole style will look like this:
transform: translate3d(tx, ty, tz) translateX(tx)
Is there a way to do this in CSS? I don't want to overwrite the existing style property but add onto it.. My project is in Angular so would I have to do some code in the component end? Any help is greatly appreciated!
EDIT: I should also mention that the translate3d style is already defined for the element, not in my css file but by default (I'm using a library that sets the style for the element already). What I am trying to figure out is how to grab the current style, which is transform: translate3d
AND add the translateX
style to it as well so that it looks like:
transform: translate3d(tx, ty, tz) translateX(tx)
I will say it again, I do not set the translate3d in my own css file but it's a style that is automatically set for that specific element because of the library. If it helps, the library I am using is Leaflet for Angular