我有以下HTML:
<div>
<img src="">
<div><!-- centered form on top of the image --></div>
</div>
我该如何使用Tailwind?解决方案必须具有响应性。我不想使用背景图像CSS属性。我想改用<img>
标签
标记一定是那样吗?这样的事情怎么样:
<div class="container mx-auto bg-gray-500 w-1/2 p-4 relative">
<img src="http://placehold.it/300" alt="" class="w-full h-auto">
<div class="bg-red-300 w-1/2 h-1/2 absolute top-1/4 left-1/4 rounded-lg p-4">div</div>
</div>
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句