Skip to content

Instantly share code, notes, and snippets.

@ezamelczyk
Created April 11, 2016 11:37
Show Gist options
  • Save ezamelczyk/2667305b199027dc766e582c3633e83f to your computer and use it in GitHub Desktop.
Save ezamelczyk/2667305b199027dc766e582c3633e83f to your computer and use it in GitHub Desktop.
.marquee {
width: 30vw;
height: 10vh;
position: relative;
background-color: #222;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
-ms-flex-align: center;
-webkit-align-items: center;
-webkit-box-align: center;
align-items: center;
-webkit-border-radius: 5px;
border-radius: 5px;
-webkit-box-shadow: inset 0px 2px 2px rgba(0, 0, 0, .5), 0px 1px 0px rgba(250, 250, 250, .2);
box-shadow: inset 0px 2px 2px rgba(0, 0, 0, .5), 0px 1px 0px rgba(250, 250, 250, .2);
}
.marquee a.news {
position: absolute;
text-align: center;
margin: auto;
width:100%;
color: #fff;
text-shadow: 1px 1px 0px #000000;
filter: dropshadow(color=#000000, offx=1, offy=1);
transform:translateX(100%);
}
@keyframes left-one {
0% {
transform:translateX(100%);
}
10% {
transform:translateX(0);
}
40% {
transform:translateX(0);
}
50% {
transform:translateX(-100%);
}
100%{
transform:translateX(-100%);
}
}
@keyframes left-two {
0% {
transform:translateX(100%);
}
50% {
transform:translateX(100%);
}
60% {
transform:translateX(0);
}
90% {
transform:translateX(0);
}
100%{
transform:translateX(-100%);
}
}
.marquee a:nth-child(1) {
animation: left-one 10s ease infinite;
}
.marquee a:nth-child(2) {
animation: left-two 10s ease infinite;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment