Remove/reset CSS behavior property

你。 提交于 2019-12-01 02:04:23
Jeremy Kauffman

The default value is "none". See:

What is the *correct* way to unset the behavior property in CSS?

The solution:

.a-rule
{
  behavior: url(/some.htc);
}
.a-rule.more-specific
{
  behavior: none;
}
.a_rule {
  border: 1px solid black; /* we know border is black */
  behavior: url(/some.htc) /* we know something happen inside some.htc */
}
 .a_rule.more-specific {
  border: 0 none; /* we remove the border */
  behavior: url(/some.htc) /* we remove something inside some.htc */
}

use different .htc file

Maybe use conditional tags for IE in your head

<!--[if IE]>
<style type="text/css">
    .a-rule {
       behavior: url(/some.htc);
    }
</style>
<![endif]-->
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!