Last active
September 27, 2016 19:29
-
-
Save dotnetCarpenter/fc227f305b001d7235abcc644b9bfc64 to your computer and use it in GitHub Desktop.
Minimum required to set an underline that can be animated
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
/** | |
* Minimum required to set an underline that can be animated | |
*/ | |
.f-jons-demo1 h2 { | |
display: inline; /* an inline element only takes up the size of its content (the content is "Hello World") */ | |
color: darkred;/* not needed - set the color of the text */ | |
background: linear-gradient(grey, grey) bottom / 100% .1em no-repeat; | |
} | |
/* The above can also be written like this: */ | |
.f-jons-demo1 h2 { | |
display: inline; | |
color: darkred;/* not needed - set the color of the text */ | |
background-color: linear-gradient(grey, grey); | |
background-position: bottom; | |
background-repeat: no-repeat; | |
background-size: 100% 0.1em; | |
} | |
/* Minimum required to set an underline */ | |
.f-jons-demo2 h2 { | |
color: darkred;/* not needed - set the color of the text */ | |
text-decoration: grey underline;/* no control over how thick the line is */ | |
} |
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 class="f-jons-demo1"> <h2>Hello World</h2> <p> Text and text Text and text Text and text Text and text Text and text Text and text Text and text Text and text Text and text Text and text. </p> <p> Text and text Text and text Text and text Text and text. </p></div> | |
<div class="f-jons-demo2"> <h2>Hello World</h2> <p> Text and text Text and text Text and text Text and text Text and text Text and text Text and text Text and text Text and text Text and text. </p> <p> Text and text Text and text Text and text Text and text. </p></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
// alert('Hello world!'); |
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
{"view":"split-vertical","fontsize":"90","seethrough":"","prefixfree":"1","page":"all"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment