IE7 CSS inheritance does not work

后端 未结 4 2033
梦如初夏
梦如初夏 2020-12-05 17:24

I have set some style for h2 tags (color, font-size, etc.), but when I put \"A\" tag inside, then style becomes as link. My html:

4条回答
  •  再見小時候
    2020-12-05 18:05

    try

    a.no-decor{
      color:inherit;
      //color:expression(this.parentNode.currentStyle['color']);
      text-decoration:none;
    }
    

    That'll get rid of your blue color and the underline. You could use a similar expression for the underline, but you'd be better off just using text-decoration:none since that's all an inherited text-decoration is gonna give you anyhow and no need to use expressions when not absolutely necessary (you'll take a performance hit when using expressions).

提交回复
热议问题