Is it possible to utilize jquery window.resize() to ensure that the positioning of the two donuts never interferes with the text in the middle of the home? I am unsure of how to connect the x and y values of the window size to adjust the top/left and bottom/right positioning.
Alternatively, is there a method to reduce the width and height of the donuts upon window resize?
Any assistance on this matter would be greatly appreciated!
html, body {
margin: 0;
}
#container {
width: 100vw;
height: 100vh;
background-color: pink;
display: flex;
align-items: center;
overflow: hidden;
position: relative;
}
#donut img,
#donut2 img {
width: 500px;
height: 500px;
}
#donut {
width: auto;
height: auto;
position: absolute;
animation: donut 2s;
animation-fill-mode: forwards;
}
...