Created
August 3, 2017 10:51
-
-
Save ppeeou/d5b205cabb482396591351f4c59482a4 to your computer and use it in GitHub Desktop.
html marquee
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
| html | |
| <div className="marquee"> | |
| <div> | |
| <span> {summary}</span> | |
| <span> {summary}</span> | |
| </div> | |
| </div> | |
| css | |
| .marquee { | |
| height: 14px; | |
| width: 70%; | |
| overflow: hidden; | |
| position: relative; | |
| color: #999; | |
| } | |
| .marquee:after { | |
| clear: both; | |
| } | |
| .marquee div { | |
| display: block; | |
| width: 200%; | |
| height: 15px; | |
| position: absolute; | |
| overflow: hidden; | |
| animation: marquee 4s linear infinite; | |
| } | |
| .marquee span { | |
| float: left; | |
| width: 50%; | |
| } | |
| @keyframes marquee { | |
| 0% { | |
| left: 0; | |
| } | |
| 100% { | |
| left: -100%; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment