Skip to content

Instantly share code, notes, and snippets.

@jinze
Forked from csssecrets/dabblet.css
Last active August 9, 2017 11:44
Show Gist options
  • Save jinze/ccd3a4644d251cfcbae72ad56315c350 to your computer and use it in GitHub Desktop.
Save jinze/ccd3a4644d251cfcbae72ad56315c350 to your computer and use it in GitHub Desktop.
Marching ants border
/**
* Marching ants border
*/
.wrapper{
border: 1PX solid rgba(0,0,0,0);
background-image: linear-gradient(#fff, #fff), repeating-linear-gradient(-45deg, #000 0, #000 12.5%, transparent 0, transparent 25%, #000 0, #000 37.5%, transparent 0,transparent 50%);
background-clip:padding-box, border-box;
background-size:1em 1em;
width:700px;
height:300px;
box-sizing:border-box;
padding: 1em;
animation: ants 20s linear infinite;
}
@keyframes ants {
to { background-position: 100% 100%; }
}
<div class="wrapper"></div>
// alert('Hello world!');
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"css"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment