pesudo element
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style>
.box{
height: 200px;
width: 200px;
background: #22bf60;
}
.box:hover{
height: 250px;
width: 250px;
background: red;
}
.p:first-line{
color: red;
}
.p:before{
content: "*";
color: green;
font-size: x-large;
}
.p:after{
content:'*';
color: green;
font-size: x-large;
}
.p:first-letter{
color: #042a84;
font-size: x-large;
}
</style>
</head>
<body>
<div class="box">
</div>
<p class="p">
CSS pseudo-elements are used to add special effects to some selectors. You do <br>
not need to use JavaScript or any other script to use those effects. A simple<br>
syntax of pseudo-element is as follows:
</p>
</body>
</html>
Comments
Post a Comment