Last active
September 10, 2016 06:16
-
-
Save sudarshanReddykurri/bdcb3d94d92d8b0c10bf5de8f89c1be9 to your computer and use it in GitHub Desktop.
Adding Mutli line Content Using CSS & JS (Method-3)
This file contains hidden or 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 id="test3">Hello World</div> |
This file contains hidden or 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
| document.getElementById('test3').setAttribute('data-extra', " of baz \n food"); |
This file contains hidden or 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
| #test3:after { | |
| content : attr(data-extra); | |
| white-space: pre; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment