CSS Pseudo class and Pseudo Element (part-1)
Today I will show you another most important topic of CSS. lets see first Example 1
(1) Hover
lets we have a anchor text like this
Now see when we took our mouse in anchor text is not hovering
Now we implement Hover in our code
and see what happen
lets start
and see the result
lets see, when we took our mouse in the anchor text , the text background color change into blue.
not only background we can also change text color
and the result is
2: First-letter
Now we see that how to change the first letter
Implement code is
<!DOCTYPE html>
<html lang="en">
<head>
<title>Document</title>
<style>
.ab::first-letter{
background-color: blue;
color: yellow;
font-size: 3rem;
}
</style>
</head>
<body>
<h2 class="ab">This is a CSS Tutorial</h2>
</body>
</html>
Foe more in CSS click here
0 Comments