CSS Tutorial in Hindi
CSS Tutorial in Hindi
Agenda
1 Pseudo Classes
2 CSS Border
4 CSS Project
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Pseudo classes
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Pseudo classes
CSS pseudo-classes
A pseudo-class can be defined as a keyword which is combined to a selector that defines the special state of the
selected elements. It is added to the selector for adding an effect to the existing elements based on their states.
Syntax
A pseudo-class starts with a colon (:). Let's see its syntax.
selector: pseudo-class {
property: value;
}
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Pseudo classes
Pseudo-class
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Pseudo classes
<style> <body>
body{ <h1>Hello world </h1>
text-align:center; <h2>This is an example of :hover pseudo class</h2>
} <h3>Click the following link to see the effect</h3>
h1:hover{ <a href="https://www.google.com">Click the link</a>
color:red; <a href="https://www.youtube.com">Click the link</a>
} </body>
a:visited{
color: red;
}
a:active{
color: yellow;
}
a:link{
color:green;
}
</style>
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
CSS Border
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
CSS Border
● You can set the border for specifically top, right, bottom and left
● We can also club top and bottom together and same goes for left and right
○ Eg: border-width: 2px 5px; sets top and bottom 2px; left and right 5px
● Border can also be set in a single line
○ Eg: border : 2px solid blue;
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
CSS Box Model
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
CSS Box Model
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
PROJECT
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited
Thank You
Proprietary content. ©Great Learning. All Rights Reserved. Unauthorized use or distribution prohibited