Created
September 9, 2024 15:58
-
-
Save geekboots-team/9ae4e66ed1c76049e95ec0c87f30a922 to your computer and use it in GitHub Desktop.
Difference box-shadow and drop-shadow in CSS and how it is different?
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 lang="en"> | |
| <head> | |
| <meta charset="UTF-8" /> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
| <title>Document</title> | |
| <style> | |
| * { | |
| margin: 0; | |
| padding: 0; | |
| } | |
| body { | |
| background: #212121; | |
| } | |
| section { | |
| width: 100%; | |
| height: 100vh; | |
| display: flex; | |
| justify-content: center; | |
| align-items: center; | |
| } | |
| img { | |
| /* Box Shadow */ | |
| box-shadow: 0 0 15px #fbf792; | |
| /* Drop Shadow */ | |
| filter: drop-shadow(0 -5px 15px #fbf792); | |
| } | |
| </style> | |
| </head> | |
| <body> | |
| <section> | |
| <img src="princess.png" alt="" width="250" /> | |
| </section> | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment