【发布时间】:2021-09-05 14:29:06
【问题描述】:
我想将我的图像与透明标题重叠?如果没有 margin-top: -36px in section,我怎么能做到这一点?谢谢
<header class="bg-transparent shadow-md sticky top-0 z-50">
<div class="flex items-center justify-between">
<a href="#" class="border-2 border-red-500"><img class="h-8" src="/images/eco2.png" alt=""></a>
<div class="border-2 border-red-500">
<a class ="" href="#">Home</a>
<a class ="" href="#">About Us</a>
<a class ="" href="#">Contact Us</a>
<a class ="" href="#">Projects</a>
</div>
</div>
<div class="flex flex-col hidden">
<a href="#" class="border-2 border-red-500">Home</a>
<a href="#" class="border-2 border-red-500">About Us</a>
<a href="#" class="border-2 border-red-500">Contact Us</a>
<a href="#" class="border-2 border-red-500">Projects</a>
</div>
</header>
<section class="h-screen w-full bg-hero-pic" >
</section>
【问题讨论】:
-
上图就是展示的那一张。我想要的是让英雄部分占据空白。我不知道为什么它有空格,即使标题的 bg 是透明的。希望你们能帮助我
标签: tailwind-css