在Bootstrap中的链接下划线问题

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

link underlining issue in bootstrap

问题

我将以下部分翻译成中文:

"我向我的ASP.Net MVC项目添加了一个模板,将所有附加文件添加到了模板中。此外,我在布局文件中添加了所有格式文件(CSS)的调用,删除了与默认样式文件相关的所有调用。应用程序运行后,我注意到页面上的所有链接<a>都有下划线,而在我下载的模板中不存在这种情况。我搜索了所有负责此问题的CSS文件中的属性,并手动修改它们,以防止出现此格式,但没有发生任何变化。请问有什么建议吗?"

英文:

I added a template to my ASP.Net MVC project, I added all the attached files to the template. In addition, I added all of the calls to the format files (CSS) in layout file, and I removed all the calls related to the default styling files.
After I ran the application, I noticed that all the links <a> on the page are underlined, and this thing is not present in the template that I downloaded. I searched for all the attributes responsible for this in CSS files and modified them manually so that this format does not occur, but no changes happens. please any advise??

答案1

得分: 1

样式的顺序在应用时很重要。在模板style.css中,似乎是在_reboot.scss之后应用的,但在您的情况中则相反。如果您可以重新排列您的样式,先引入Bootstrap,然后在自定义/模板样式之后,这应该可以解决问题;否则,最简单的解决方法是在您的style.css中添加!important,这将解决问题。

英文:

The order of styles matter when they are applied. it seems in the template style.css is applied after _reboot.scss, but vice versa in your case. If you can reorder your styles, bootstrap before then your custom/template styles after, that should solve the issue or else, simplest solution would be to put an !important in your style.css and it will solve the issue.

huangapple
  • 本文由 发表于 2023年3月7日 17:54:02
  • 转载请务必保留本文链接:https://go.coder-hub.com/75660389.html
匿名

发表评论

匿名网友

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

确定