Skip to content

Instantly share code, notes, and snippets.

@danielmascena
Last active December 16, 2016 14:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danielmascena/75bcdf65ba8cdaf34f49fb6ba0354e08 to your computer and use it in GitHub Desktop.
Save danielmascena/75bcdf65ba8cdaf34f49fb6ba0354e08 to your computer and use it in GitHub Desktop.
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
:root {
--xis: calc(100% - 60%);
}
#fundo {
background: url(http://i.imgur.com/UZKEjzG.png) -800px center;
height: 300px;
width: 1000px;
animation: rolling-position 10s infinite linear;
}
#fundo:before {
content: "";
position: fixed;
display: block;
left: var(--xis);
background: green;
top: 110px;
width: 10px;
height: 10px;
box-shadow: 0px 10px,
10px 10px blue;
}
#fundo:hover:before{
left: 220px;
transition: left 4s linear;
}
#cubo {
width: 20px;
height: 20px;
background: red;
position: fixed;
left: 200px;
top: 100px;
}
@keyframes rolling-position {
to {
background-position: -1800px center;
}
}
<!-- content to be placed inside <body>…</body> -->
<section id="fundo">
<div id="cubo"></div>
</section>
// alert('Hello world!');
{"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