you need to add the "transform" class
Answer from DavidWebb on Stack Overflowyou need to add the "transform" class
In order to fit in your scaled image within a fixed frame, you have to add "overflow-hidden" to your parent element.
An example below shows an image is scaled to 110% during hover and still fit within the parent frame.
<div className="overflow-hidden">
<img className="... hover:scale-110">
...
</img>
</div>
I'm using TailwindCSS since past 6 months or so and have developed some designs in it. Recently I ran into a problem where my site was looking great till 1536px viewport size but began to shrink on 1080p and was barely readable on 4K resolution. I use Tailwind response design prefix like md, lg, 2xl etc. I thought the browser will scale up my site to adjust with the display but it's not doing it. I've even set the viewport value to width=device-width, initial-scale=1.0, user-scalable=no, shrink-to-fit=no, am I missing something?