Created
August 15, 2014 23:02
-
-
Save bbbrrriiiaaannn/7cff06013d0918e222b4 to your computer and use it in GitHub Desktop.
// source http://jsbin.com/huhid/1
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 charset="utf-8"> | |
<title>JS Bin</title> | |
<style id="jsbin-css"> | |
div { | |
margin-top: 40px; | |
} | |
[data-placement-id] { | |
outline: 1px solid red; | |
} | |
[data-placement-id]::before { | |
content: "Placement: " attr(data-placement-id); | |
position: absolute; | |
margin: -26px 0 0 -1px; | |
height: 18px; | |
background: red; | |
color: white; | |
padding: 4px; | |
} | |
</style> | |
</head> | |
<body> | |
<div data-placement-id="sup">Hello there</div> | |
<script id="jsbin-source-css" type="text/css">div | |
margin-top: 40px | |
[data-placement-id] | |
outline: 1px solid red | |
&::before | |
content: "Placement: " attr(data-placement-id) | |
position: absolute | |
margin: -26px 0 0 -1px | |
height: 18px | |
background: red | |
color: white | |
padding: 4px</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
div { | |
margin-top: 40px; | |
} | |
[data-placement-id] { | |
outline: 1px solid red; | |
} | |
[data-placement-id]::before { | |
content: "Placement: " attr(data-placement-id); | |
position: absolute; | |
margin: -26px 0 0 -1px; | |
height: 18px; | |
background: red; | |
color: white; | |
padding: 4px; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment