woo*_*oof 9 html css tailwind-css
我试图避免在我的<a>标签下有下划线。我已经按照文档添加了该类"no-underline",但我的链接下仍然有下划线?我添加了下面使用的代码:
<div
class="
my-3
flex flex-wrap
-m-1
text-center
justify-center
items-center
no-underline
"
>
<div class="m-auto">
{% for tag in tags %}
<a
href="{% routablepageurl blog_page 'post_by_tag' tag.slug %}"
class="no-underline"
>
<span
class="
font-mono
m-1
bg-gray-200
hover:bg-gray-300
rounded-full
px-2
py-1
font-bold
text-sm
leading-loose
cursor-pointer
shadow-lg
no-underline
"
>{{ tag }}</span
>
</a>
{% empty %} No tags yet {% endfor %}
</div>
</div>
Thanks for the help!
Run Code Online (Sandbox Code Playgroud)
添加no-underline到
<div class="m-auto">
Run Code Online (Sandbox Code Playgroud)
underline并确保父 div 中没有类。
您还可以尝试添加
style="text-decoration: none !important;"
Run Code Online (Sandbox Code Playgroud)
如果这些不起作用,请放入 div 标签中。