Use of Not pseudo class in css

In css new pseudo class is “not”.
It define the to apply all attribute but given parameter not apply it.
“Not” is new css attribute so it is not work with internet explorer.

For Example HTML file is:

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>krButani</title>
<style>
.cons {
color:#FF0000;
}
/*
div:not(.cons) means the all div element which class is not .cons that
apply green color.
*/
div:not(.cons) {
color:green;
}
</style>
</head>

<body>
<div class="cons">
MakeChanges
</div>

<div class="des">
MakeChanges
</div>
</body>
</html>

Output is :


Comments

Popular posts from this blog

Java Mysql Database Connectivity without download mysql connector file [use netbeans] - krButani