什么是*正确*方式来取消设置CSS中的行为属性? [英] What is the *correct* way to unset the behavior property in CSS?

查看:148
本文介绍了什么是*正确*方式来取消设置CSS中的行为属性?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道正确的方法来重置/取消设置CSS 行为属性是为IE。

I'm wondering what the correct way to reset/unset the CSS behavior property is for IE.

div { behavior:url(fixIE.htc); }

我需要为某些特定的元素重置。在我注意到此不起作用后,我开始搜索答案

I need to reset this for some specific elements. I started searching for the answer after I noticed that this does not work:

.my-div { behavior:0; }

我发现一个SO post 说一个空字符串工作,但没有引用引用,这是其实是正确的方法:

I found an SO post that says an empty string worked, but there's no reference cited that this is in fact the correct way to do it:

.my-div { behavior:''; }

但是,我已经看到这个在我遇到的一些代码中使用:

However, I've seen this used in some code I've come across:

.my-div { behavior:none; }

我找不到任何实际的引用,因为它不是真的在规范,最接近的事情,我发现是这里:

I cannot find any actual reference as it's not really in the spec, the closest thing I found was here:

http://reference.sitepoint.com/css/behavior

...但尚未澄清问题。

...but it doesn't clarify the issue.

哪种方式正确,或者它没有关系(考虑javascript互动,如果它有什么区别)?

Which way is correct, or does it not matter (consider javascript interaction as well, if it makes any difference)? Please include a reference if it exists - that's what I'm really looking for.

推荐答案

您可以在w3c文档中查看它此处。正如说的,初始值是 none

You can check it at the w3c documentation here. As it says, the initial value is none.

这篇关于什么是*正确*方式来取消设置CSS中的行为属性?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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