Skip to content

Instantly share code, notes, and snippets.

@yiskang
Created September 25, 2019 01:35
Show Gist options
  • Save yiskang/96ac59a1809d15dc7408b380d6443e90 to your computer and use it in GitHub Desktop.
Save yiskang/96ac59a1809d15dc7408b380d6443e90 to your computer and use it in GitHub Desktop.
CSS replacement of marquee example
<!DOCTYPE html>
<html>
<head>
<title>CSS replacement of marquee example</title>
<meta charset="utf-8" content="ref:https://www.sololearn.com/Discuss/905300/what-is-the-replacement-of-marquee-in-html5">
<style type="text/css">
.marquee {
width: 300px;
line-height: 50px;
background-color: Pink;
color: Black;
white-space: nowrap;
overflow: hidden;
box-sizing: border-box;
}
.marquee p {
display: inline-block;
padding-left: 100%;
animation: marquee 10s linear infinite;
}
@keyframes marquee {
0% {
transform: translate(0, 0);
}
100% {
transform: translate(-100%, 0);
}
}
</style>
</head>
<body>
<div class="marquee">
<p>
<b>HI THERE!</b>
</p>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment