Skip to content

Instantly share code, notes, and snippets.

@Mehuge
Created July 7, 2018 18:05
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 Mehuge/b84035973c9f4518c7f6ee16bd31d964 to your computer and use it in GitHub Desktop.
Save Mehuge/b84035973c9f4518c7f6ee16bd31d964 to your computer and use it in GitHub Desktop.
<style>
@-webkit-keyframes animateBorder {
0% {
background-position: left top, right top, right bottom, left bottom;
}
100% {
background-position: right top, right bottom, left bottom, left top;
}
}
.box {
width: 100px;
height: 100px;
margin: 10px;
padding: 5px;
}
.anim-border {
background:
linear-gradient(90deg, rgba(145, 116, 58, 0.5) 50%, transparent 50%),
linear-gradient(0deg, rgba(145, 116, 58, 0.5) 50%, transparent 50%),
linear-gradient(90deg, rgba(145, 116, 58, 0.5) 50%, transparent 50%),
linear-gradient(0deg, rgba(145, 116, 58, 0.5) 50%, transparent 50%);
background-repeat: repeat-x, repeat-y, repeat-x, repeat-y;
background-size: 15px 3px, 3px 15px, 15px 3px, 3px 15px;
background-position: left top, right top, left bottom, left top;
-webkit-animation: animateBorder 10s infinite linear;
}
</style>
<div class="box anim-border">
Hello
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment