开发者

linkstyling css exception? css or jquery?

Howdy,

I love this neat thing found on css-tricks:

开发者_如何学Goa:active {
  position: relative;
  top: 1px;
}

Every link gives a little trigger-response.

However, I want almost all my links to do that, except the ones inside of .children.

Can I create an exception like :not (from jQuery) within CSS?

Thank you for your help!


You can just add an additional style rule in CSS, no need for JavaScript, like this:

.children a:active {
  position: static;
  top: 0px;
}


css

.children a:active {
  /* whatever */
}

assuming your use of ".children" is a class

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜