DYNAMICALLY禁用CSS链接? [英] DYNAMICALLY disable links with CSS?

查看:58
本文介绍了DYNAMICALLY禁用CSS链接?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你有一个带有href链接的锚点。


你能否使用样式表来有效地禁用链接,这样你就可以了b / b
'点击它;它会简单地显示为文本吗?

You have an, a, anchor with href link.

Can you use a stylesheet to effectively disable the link, so that you
can''t click on it; that it will appear simply as text?

推荐答案

Mark Johnson< 10 ******* @ compuserve.com>写道:
Mark Johnson <10*******@compuserve.com> wrote:
你有一个带有href链接的锚点。

你能否使用样式表来有效地禁用链接,这样你就可以了>不能点击它;它会简单地显示为文字吗?
You have an, a, anchor with href link.

Can you use a stylesheet to effectively disable the link, so that you
can''t click on it; that it will appear simply as text?




No.

为什么?


-

Spartanicus



No.
Why?

--
Spartanicus


Mark Johnson< 10 ******* @ compuserve.com>写道:
Mark Johnson <10*******@compuserve.com> wrote:
你有一个带有href链接的锚点。

你能否使用样式表来有效地禁用链接,这样你就可以了>不能点击它;它会简单地显示为文字吗?
You have an, a, anchor with href link.

Can you use a stylesheet to effectively disable the link, so that you
can''t click on it; that it will appear simply as text?




No.

为什么?


-

Spartanicus



No.
Why?

--
Spartanicus


Mark Johnson< 10 ******* @ compuserve.com>写道:
Mark Johnson <10*******@compuserve.com> wrote:
你有一个带有href链接的锚点。

你能否使用样式表来有效地禁用链接,这样你就可以了>不能点击它;


编号如果您不想要链接,则不要在HTML中包含该链接。

它将简单地显示为文本?
You have an, a, anchor with href link.

Can you use a stylesheet to effectively disable the link, so that you
can''t click on it;
No. If you don''t want a link then don''t include the link in the HTML.
that it will appear simply as text?




排序。

a:链接,a:访问过,a:悬停{color:black;背景:白色;

text-decoration:none;光标:默认;}


在视觉上隐藏它,但任何通过链接标记的人仍然会看到它周围的焦点矩形(或者它们的浏览器'')等价)。

添加:focus {-moz-outline:none;}然后将在Mozilla中删除它。

Opera支持大纲,但使用背景颜色更改为

表示关注链接,并且不允许样式删除它。对于

IE,您需要使用JavaScript来模糊()链接。


但对于某些事情而言,这需要付出很多努力。更容易实现

首先不包括链接。


Steve


-

我的理论给你起见,我的异端邪说你愤怒,

我从不回信,你不喜欢我的领带。 - 医生


Steve Pugh< st *** @ pugh.net> < http://steve.pugh.net/>



Sort of.
a:link, a:visited, a:hover {color: black; background: white;
text-decoration: none; cursor: default;}

Conceals it visually, but anyone tabbing through the links will still
see a focus rectangle around it (or their browser''s equivalent).
Adding a:focus {-moz-outline: none;} will then remove this in Mozilla.
Opera supports outline, but uses a background colour change to
indicate focus on links and doesn''t allow styles to remove that. For
IE you would need to use JavaScript to blur() the link.

But it''s all a lot of effort for something that''s much easier achieved
by simply not including the link in the first place.

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don''t like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>


这篇关于DYNAMICALLY禁用CSS链接?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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