Before & After CSS property

By March 28, 2016CSS

Here is a simple way to implement the before & after CSS property. Lets create a new class “class” & texts be “Text1” & “Text2”

.class {
font-size: 0 !important;
}
.class::before{
content: "Text1";
font-size: 20px;
}
.class::after{
content: "Text2";
font-size: 20px;
color:#000;
}