@GrzywN
Posted
Great job on the challenge! You can specify images, by using <img src="" alt="" />
tag for all images and if you want to change fill
property in CSS of SVG file you can use <object data="" type="image/svg+xml"></object>
Sometimes using background-image
is the best way, but it's almost always better to use <img>
tag.
To move items relatively, for example to the left/right, top/bottom it's great to use transform property is CSS instead of margins and paddings. For example transform: translateX(-1em);
. It makes code intuitive and easier to understand (also, it's easier to animate/transition transforms).
To move background-image
, you can use background-position
property. For example: background-position: left -10rem center;
Also, if you don't want your background to repeat, you must specify background-repeat: no-repeat;
.
I hope this will help you in your future projects. Have a nice day and happy coding too!
Marked as helpful