What is the best way to place a picture inside the cubes in the game "tags" in JS?
-
Hello experts!
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,
Here is the link: a33637y3.beget.tech/Project/GemPuzzle/srcJavaScript Anonymous, Jun 25, 2020 -
The object-fit property will help you. https://developer.mozilla.org/en/docs/Web/CSS / obje ...Anonymous
1 Answers
Your Answer
To place the code, please use CodePen or similar tool. Thanks you!