What is the best way to place a picture inside the cubes in the game "tags" in JS?
I'm learning Js and was given the task to make tags so that instead of numbers there were parts of the pictures, but I can't even place the picture inside the block, the picture breaks right away, I tried it through CSS, I tried innerHTML in the div in js, nothing came of it, help!
As far as I understand, you can use background image to position the image, and background position to position part of the image,
The object-fit property will help you. https://developer.mozilla.org/en/docs/Web/CSS / obje ...Anonymous
To place the code, please use CodePen or similar tool. Thanks you!