2016-11-26 8 views
0

WordPress用のプラグインを作成していますが、リンクを追加するとアンダーラインが消えません。私が使っているテーマは twentysixteenです。ここに私のHTMLは次のとおりです。リンクアンダーラインは消えません

<a class="thisisunique" href="#" style="text-decoration:none;">some text</a> 

text-decorationをしてもインライン化されているので、私は、これが動作しないことを驚きです。私もテーマはtext-decorationを使用していないと説明したテーマ(https://wordpress.org/support/topic/remove-underline-from-links-2/)、の開発者からのコードが含まれて

a.thisisunique, a.thisisunique:link, a.thisisunique:visited, a.thisisunique:hover, a.thisisunique:active, a.thisisunique:focus { 
    text-decoration: none !important; 
} 

が、border-bottomは(何らかの理由で)下線を達成するために:私もCSSでこれを含ま:

.entry-content a, .entry-summary a, .page-content a, .comment-content a, .pingback, .comment-body > a, .textwidget a { 
    border-bottom: none; 
} 

しかし、残念なことに、下線が残っています。

text-decoration: overline;を実行すると、実際にリンクにオーバーラインが追加されるということも奇妙です。

何が紛れていますか?

+0

は、ブラウザのキャッシュをクリアしたことがありますか? – user2182349

+0

あなたは興味深い点を挙げています:何が起こっているのかを知るためにテーマを修正していたが、何も変わっていないことに気付いた。彼らはキャッシュされていたことが判明したので、毎回キャッシュをクリアする必要がありました。 –

答えて

1

私はあなたが!:box-shadow: 0 1px 0 0 currentColor;はすべてこの責任銃の息子である

.entry-content a, 
.entry-summary a, 
.taxonomy-description a, 
.logged-in-as a, 
.comment-content a, 
.pingback .comment-body > a, 
.textwidget a, 
.entry-footer a:hover, 
.site-info a:hover { 
    box-shadow: 0 1px 0 0 currentColor; 
} 

が欠落しているもの、あなたを教えてあげましょう!

何がbox-shadowですか?なぜ???

これは、WordPressディレクトリ全体を1時間掘り下げた後に見つけたものです。上記のコードは、テーマの style.cssファイルにあります。とにかく、ちょうど実行しています

box-shadow: none; 

最終的にそのダムの下線を取り除いた。

+0

'box-shadow'はアンダーラインに使用されることがあります。別のものを与えることができますし、標準的なテキスト装飾から見栄えの良いものもあります。それは確かにより "スタイル可能"です。 ['border-bottom'と' text-shadow'も同様の方法で使用できます](https://walterebert.com/blog/underlined-links-css3-box-shadow-text-shadow/)。 –

+0

ああ。私はまだかなりHTMLとCSSに新しいので、おそらく私だけです。 –

0

スタイルをより具体的にするようにしてください: .widget-area .widget .link-style-1:visited { color:green; } 可能共有している場合は、リンクの場所..

{ parent. a.thisisunique, 
    parent. a.thisisunique:link, 
    parent. a.thisisunique:visited, 
    parent. a.thisisunique:hover, 
    parent. a.thisisunique:active, 
    parent. a.thisisunique:focus { 
    text-decoration: none !important; 
    } 
関連する問題