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
精彩评论