I have a project where I want to create a visual element with an image inside a rotated container (div). However, I'm facing an issue where the image also rotates along with the container. Is there a way to keep the image straight and cover the container while it's being rotated?
<template>
<div class="p-4">
<div class="w-80 h-80 bg-blue-500 rotate-90">
<div class="w-80 h-80 bg-red-500 rotate-45">
<img
class="h-full w-full object-cover object-center"
src="https://www.aerointernational.de/content/uploads/2022/09/albums-global-8000-exterior-1_0-scaled-1150x600.jpg"
fit="fill"
alt="aircraft"
/>
</div>
</div>
</div>
</template>
If you'd like to see a visual demonstration of the issue, please visit the following link on codesandbox: https://codesandbox.io/s/hardcore-microservice-vix2uh?file=/pages/index.vue
The technologies I am using for this project are Nuxt.js and Tailwind CSS.