I have been attempting to move an element to the left using the transform
property. However, there is already a pre-existing style with transform
, which appears as:
transform: translate3d(tx, ty, tz)
What I am aiming for is to incorporate another property alongside translate3d(tx, ty, tz)
, known as translateX(tx)
. Therefore, the complete style would be:
transform: translate3d(tx, ty, tz) translateX(tx)
Is it possible to achieve this in CSS without overwriting the current style? My project uses Angular, so should I make changes in the component code? Any guidance on this matter is highly appreciated!
EDIT: I would like to clarify that the translate3d style is already applied to the element by default (not in my own css file, but set automatically by a library). What I am trying to understand is how to retrieve the current style, which is transform: translate3d
, and add the translateX
style to it as well, resulting in:
transform: translate3d(tx, ty, tz) translateX(tx)
Once again, I want to emphasize that I did not define the translate3d in my css file; it is a style that is automatically set for that specific element due to the library being used. For reference, the library in question is Leaflet for Angular