2017-06-19 125 views
0

我想重写我的wordpress网站的样式表,并从特定锚中删除下划线。内联样式优先于表单和样式标签?

例如

<a href="https://www.mypagehere/" data-emacategory="In-Page Navigation">My Page Title Here</a> 

这里是CSS

a, a:active, a:hover, a:visited { 
    color: #000; 
    text-decoration: none; 
} 


a:-webkit-any-link { 
    color: -webkit-link; 
    cursor: auto; 
    text-decoration: underline; 
} 

我尝试了添加内嵌式“文本修饰:无”的锚标记,但它似乎并没有工作。

<a href="https://www.mypagehere/" data-emacategory="In-Page Navigation" style="text-decoration: none">My Page Title Here</a> 

我做错了什么?我认为内联样式优先于样式表和样式标签?

+0

为什么要使用一个:-webkit-任何链接? – tech2017

+2

内联风格的作品..在这里检查https://jsfiddle.net/gk0623zy/ –

+1

尝试添加!important-> text-decoration:none!important; – buxbeatz

回答

1

你怎么样添加!importantcss这样的:

<a href="https://www.mypagehere/" data-emacategory="In-Page Navigation" style="text-decoration:none!important">My Page Title Here</a> 
+0

,这并没有改变任何东西。 – JakeSays