Last active
August 29, 2015 14:10
-
-
Save luiz/7cc64cc8941195bb3386 to your computer and use it in GitHub Desktop.
Pulsating multiple borders with box-shadow & var
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Pulsating multiple borders with box-shadow & var */ | |
body { | |
--bg: #6495ED; | |
background-color: var(--bg); | |
} | |
div { | |
--border-size: 4px; | |
width: 50%; | |
height: 10em; | |
background-color: white; | |
position: fixed; | |
top: 25%; | |
left: 25%; | |
box-shadow: 0 0 0 var(--border-size) black, | |
0 0 0 calc(2 * var(--border-size)) var(--bg), | |
0 0 0 calc(3 * var(--border-size)) black, | |
0 0 0 calc(4 * var(--border-size)) var(--bg), | |
0 0 0 calc(5 * var(--border-size)) black; | |
transition: 1s; | |
} | |
div:hover { | |
--border-size: 8px; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div></div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// alert('Hello world!'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"view":"split-vertical","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