Created
July 10, 2014 16:17
-
-
Save albertywu/c1ca020f3cff799f8a10 to your computer and use it in GitHub Desktop.
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
| .box { | |
| width: 100px; | |
| height: 100px; | |
| border: 10px solid blue; | |
| margin: 30px; | |
| } | |
| .out { | |
| box-shadow: 10px 0; | |
| } | |
| .in { | |
| box-shadow: inset 10px 0; | |
| } | |
| .corner { | |
| box-shadow: 10px 10px; | |
| } | |
| .around-out { | |
| box-shadow: 0 0 0 10px green; | |
| } | |
| .around-in { | |
| box-shadow: inset 0 0 0 10px green; | |
| } | |
| .out-blur { | |
| box-shadow: 10px 0 10px; | |
| } | |
| /* setting a negative spread shrinks the box shadow size, and prevents it from spilling to adjacent edges. */ | |
| .out-blur-nospill { | |
| box-shadow: 10px 0 10px -5px; | |
| } |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>JS Bin</title> | |
| </head> | |
| <body> | |
| <div class="box out"></div> | |
| <div class="box in"></div> | |
| <div class="box corner"></div> | |
| <div class="box around-out"></div> | |
| <div class="box around-in"></div> | |
| <div class="box out-blur"></div> | |
| <div class="box out-blur-nospill"></div> | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment