The :not(s) pseudo-class negates the effect of selected element. Now create a web page named negationpc.html which shows the use of the :not(s) pseudo-class.
<!DOCTYPE HTML>
<HEAD>
<TITLE>WORKING WITH NEGATION PSEUDO-CLASS</TITLE>
<STYLE type="text/css">
p
{background:orange;
border:1px solid red;
}
:not(p){
background:silver;
margin:30px;
}
a{
background:magenta;
color:blue;
}
a:not([href*=google])
{
background:green;
color:white;}
</STYLE>
</HEAD>
<BODY>
This is the example of the the Negation pseudo-class. This is the example of the the Negation pseudo-class. This is the example of the the Negation pseudo-class. This is the example of the the Negation pseudo-class.
<P>This is the paragraph element</P>
<UL>
<LI><A HREF="http://google.com">Gooogle</A></LI>
<LI><A HREF="http://www.webmasterworld.com">Web Master World</A></LI>
<LI><A HREF="http://google.co.uk">Gooogle UK</A></LI>
<LI><A HREF="http://www.rediff.com">Rediff</A></LI>
<LI><A HREF="http://www.yahoo.com">Yahoo</A></LI>
</UL>
This is the example of the the Negation pseudo-class. This is the example of the the Negation pseudo-class. This is the example of the the Negation pseudo-class. This is the example of the the Negation pseudo-class. This is the example of the the Negation pseudo-class.
<P>This is the paragraph element second</P>
</BODY>
</HTML>
:not(s) pseudo-class is used to apply a style to the elements that are not P elements and the links that are not Google links.
The output of Above Web Page is:
<!DOCTYPE HTML>
<HEAD>
<TITLE>WORKING WITH NEGATION PSEUDO-CLASS</TITLE>
<STYLE type="text/css">
p
{background:orange;
border:1px solid red;
}
:not(p){
background:silver;
margin:30px;
}
a{
background:magenta;
color:blue;
}
a:not([href*=google])
{
background:green;
color:white;}
</STYLE>
</HEAD>
<BODY>
This is the example of the the Negation pseudo-class. This is the example of the the Negation pseudo-class. This is the example of the the Negation pseudo-class. This is the example of the the Negation pseudo-class.
<P>This is the paragraph element</P>
<UL>
<LI><A HREF="http://google.com">Gooogle</A></LI>
<LI><A HREF="http://www.webmasterworld.com">Web Master World</A></LI>
<LI><A HREF="http://google.co.uk">Gooogle UK</A></LI>
<LI><A HREF="http://www.rediff.com">Rediff</A></LI>
<LI><A HREF="http://www.yahoo.com">Yahoo</A></LI>
</UL>
This is the example of the the Negation pseudo-class. This is the example of the the Negation pseudo-class. This is the example of the the Negation pseudo-class. This is the example of the the Negation pseudo-class. This is the example of the the Negation pseudo-class.
<P>This is the paragraph element second</P>
</BODY>
</HTML>
:not(s) pseudo-class is used to apply a style to the elements that are not P elements and the links that are not Google links.
The output of Above Web Page is:
No comments:
Post a Comment