Skip to content

Instantly share code, notes, and snippets.

@jacobrask
Created June 27, 2012 22:19
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jacobrask/3007233 to your computer and use it in GitHub Desktop.
Save jacobrask/3007233 to your computer and use it in GitHub Desktop.
Fadeout and marquee
/*
Fadeout and marquee
*/
.fadeout-text {
overflow: hidden;
width: 130px;
/* Fallback solution for browsers that
doesn't support the next set of rules. */
text-overflow: ellipsis;
white-space: nowrap;
}
@media only screen {
.fadeout-text {
text-overflow: clip;
position: relative;
}
.fadeout-text:hover span {
display: inline-block;
overflow-x: -webkit-marquee;
}
.fadeout-text::after {
content: "";
position: absolute;
top: 0; bottom: 0; right: 0;
width: 20px;
background-image: linear-gradient(left,rgba(255, 255, 255, 0),white);
}
<div class="fadeout-text"><span>Stockholm, Uppland, Sweden</span></div>
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment