文字装饰继承 [英] text decoration inheritance

查看:49
本文介绍了文字装饰继承的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要一些帮助来理解这段CSS。


< u>这是一个< a href ="#"风格= QUOT;文字修饰:无;">超链接< / A>

围绕下划线< / u>


父母。但它似乎在这种情况下不起作用,整个句子仍然是下划线,即使我特意指定了没有文字装饰。我是b / b
没有说错了但是我真的无法理解为什么这是 -

这是一个例外情况吗?

顺便说一句,这只发生在Gekko(Mozilla)和Opera之后,它正好遵循W3c

推荐。 IE6似乎渲染它,就像我预期的那样

(无论如何都有超链接)。


非常感谢,

Andy

解决方案

Andrew Tang写道:


< u>这是一个< a href ="#" style =" text-decoration:none;">超链接< / a>
带有周围的下划线< / u>




不要使用内联-styles!

相反,请使用:

a:链接,a:访问等。{text-decoration ...}


当您关闭文字装饰时,请务必找到一个好的替代品

(比如设置链接颜色......并设置背景颜色)。


那能解决你的问题吗?

-

Google Blogoscoped
http://blog.outer-court.com


Philipp Lenssen写道:

Andrew Tang写道:

< u>这是一个< a href ="#" style =" text-decoration:none;">超链接< / a>
带有周围的下划线< / u>


当您关闭文本修饰时,请务必查找一个很好的替代品
(比如设置链接颜色......并设置背景颜色)。




另外,不要强调文字,这是没有链接。

-

Johannes Koch

in te domine speravi;非永久性的东西。

(Te Deum,4分。)


Johannes Koch写道:

Philipp Lenssen写道:

Andrew Tang写道:

>>< u>这是一个< a href ="#" ;
style =" text-decoration:none;">超链接< / a>
带有周围的下划线< / u>


当您关闭文字装饰时,一定要找到一个好的替换(比如设置链接颜色......并设置
背面颜色)。



另外,不要不加文字,这不是链接。




绝对。唯一需要的是在

开发阶段提醒这应该是一个链接。在网上发布的所有内容都不应该是非链接的下划线。然后有一些网站完全颠倒了这种方法......好吧。

-

Google Blogoscoped
http://blog.outer-court.com


Hi, I need some help with understanding this piece of css.

<u>This is a <a href="#" style="text-decoration:none;">hyperlink</a> with
surrounding underlining</u>

From what I understand of css, the styling in <a> should override its
parent. But it doesnt seem to work in this case, the whole sentence is still
underlined even though I have specifically specified no text-decoration. I''m
not saying its wrong but I really cant get my head around to why this is -
is this a case exception?

Btw, this only happens with Gekko (Mozilla) and Opera which follows the W3c
recommednation properly. IE6 seems to render it as I would have expected
(with hyperlinks anyway).

Much appreciated,
Andy

解决方案

Andrew Tang wrote:


<u>This is a <a href="#" style="text-decoration:none;">hyperlink</a>
with surrounding underlining</u>



Do not use inline-styles!
Instead, use:
a:link, a:visited etc. { text-decoration... }

When you turn off text-decoration, make sure to find a good replacement
(like setting the link-color... and setting the back-color).

Does that solve your problems?
--
Google Blogoscoped
http://blog.outer-court.com


Philipp Lenssen wrote:

Andrew Tang wrote:

<u>This is a <a href="#" style="text-decoration:none;">hyperlink</a>
with surrounding underlining</u>


When you turn off text-decoration, make sure to find a good replacement
(like setting the link-color... and setting the back-color).



Additionally, don''t underline text, which is no link.
--
Johannes Koch
In te domine speravi; non confundar in aeternum.
(Te Deum, 4th cent.)


Johannes Koch wrote:

Philipp Lenssen wrote:

Andrew Tang wrote:

>><u>This is a <a href="#"
style="text-decoration:none;">hyperlink</a>
with surrounding underlining</u>


When you turn off text-decoration, make sure to find a good
replacement (like setting the link-color... and setting the
back-color).



Additionally, don''t underline text, which is no link.



Absolutely. The only need for that would be as a reminder in
development stage that this should be a link. Everything that goes live
on the Web should not have underlines for none-links. And then there''s
some websites which exactly reverse this approach... oh well.
--
Google Blogoscoped
http://blog.outer-court.com


这篇关于文字装饰继承的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆