Created
September 14, 2017 07:08
-
-
Save rambhairao/b685b714de5750b01d072818392edcb9 to your computer and use it in GitHub Desktop.
css before and after properties [css before and after properties simple example]// source http://jsbin.com/biwomi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="description" content="[css before and after properties simple example]"> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title> css before and after properties </title> | |
<style id="jsbin-css"> | |
p{ | |
width: 200px; | |
height: 50px; | |
background-color: red; | |
text-align: left; | |
position: relative; | |
} | |
p::before{ | |
content: "frent"; | |
background-color: blue; | |
margin-left:0px; | |
} | |
p::after{ | |
content: "back"; | |
background-color: yellow; | |
} | |
p:hover::after{ | |
background-color: red; | |
} | |
</style> | |
</head> | |
<body> | |
<div> | |
<p> real content </p> | |
</div> | |
<script id="jsbin-source-css" type="text/css">p{ | |
width: 200px; | |
height: 50px; | |
background-color: red; | |
text-align: left; | |
position: relative; | |
} | |
p::before{ | |
content: "frent"; | |
background-color: blue; | |
margin-left:0px; | |
} | |
p::after{ | |
content: "back"; | |
background-color: yellow; | |
} | |
p:hover::after{ | |
background-color: red; | |
}</script> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
p{ | |
width: 200px; | |
height: 50px; | |
background-color: red; | |
text-align: left; | |
position: relative; | |
} | |
p::before{ | |
content: "frent"; | |
background-color: blue; | |
margin-left:0px; | |
} | |
p::after{ | |
content: "back"; | |
background-color: yellow; | |
} | |
p:hover::after{ | |
background-color: red; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment