Html 在鼠标悬停时显示超链接下划线(目前相反)
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/9262779/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Make hyperlink underline appear on mouseover (currently the opposite)
提问by Efficient Trade Ltd
I am wanting to imitate this website, which only underlines a hyperlink once the user hovers over the link.
我想模仿这个网站,一旦用户将鼠标悬停在链接上,它只会在超链接下划线。
Currently in my Magento store, any hyperlinks are already underlined before the user hovers over it & when the user does hover over the link, the underline is removed.
目前在我的Magento 商店中,任何超链接在用户悬停在它上面之前都已经加下划线,当用户悬停在链接上时,下划线被删除。
So basically, I want the very opposite of what is happening.
所以基本上,我想要与正在发生的事情完全相反的事情。
I am using Modern theme f001. Can anyone explain how I could go about changing this?
我正在使用现代主题 f001。谁能解释一下我如何去改变这个?
回答by Stelian Matei
You need to change in the CSS file of your theme:
您需要更改主题的 CSS 文件:
http://www.efficienttrade.co.nz/media/css/2221f7ff45d5b039dfab39cc684c3166.css
http://www.efficienttrade.co.nz/media/css/2221f7ff45d5b039dfab39cc684c3166.css
Line 1178:
第 1178 行:
a {
color: #1E7EC8;
text-decoration: none; // changed from text-decoration:underline
}
Line 131
第131行
a:hover {
text-decoration: underline; // changed from text:decoration:none
}
Please note that the line numbers might be wrong and you might need to search for the aclass definition in the CSS file in order to change them.
请注意,行号可能是错误的,您可能需要a在 CSS 文件中搜索类定义才能更改它们。

