Tailwind – 底部边框颜色未激活

huangapple go评论74阅读模式
英文:

Tailwind - Border bottom color is inactive

问题

请原谅我,如果这个问题已经在其他地方存在,请告诉我。

今天是我使用React JS的第一天。我正在按照Youtube上的课程(https://www.youtube.com/watch?v=b0_Y_eU_SXI)进行学习。
一切都很顺利,直到视频的1:40:00,我无法显示头部按钮的底部颜色。

这是我的Header.jsx

这是我的浏览器检查

类名"text-black border-b-red-500"被其他类覆盖了。
有人能帮我修复这个问题吗?

我试图学习React JS、Tailwind和Firebase。

英文:

Forgive me if this question already exist somewhere, please let me know.

Today is my first day with React JS. I am following the course on Youtube (https://www.youtube.com/watch?v=b0_Y_eU_SXI).
Everything's fine until 1:40:00 of video, I cannot show the bottom color of the buttons on header.

Here is my Header.jsx

And here is my browser inspect

The classes "text-black border-b-red-500" are overwrited by other classes.
Could someone please help me fix this?

I try to learn React JS, tailwind and firebase

答案1

得分: 1

我认为这与if语句有关。你可以尝试像这样更改:pathMathRoute("/") ? "text-black border-b-red-500" : "text-gray-400 border-b-transparent"

英文:

I think it’s related with if statement. You can try to change like this pathMathRoute(“/”) ? “text-black border-b-red-500” : “text-gray-400 border-b-transparent”

huangapple
  • 本文由 发表于 2023年7月6日 15:59:07
  • 转载请务必保留本文链接:https://go.coder-hub.com/76626689.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定