A Pen by Laith Serhan on CodePen.
Last active
May 10, 2019 00:27
-
-
Save git2358/24946fb57977d07304fbdeb36283dafb to your computer and use it in GitHub Desktop.
_Apple Style Menu Blur CSS Filter
This file contains 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 class="bg-image"> | |
<div class="menubar black-blur"> | |
<nav> | |
<ul> | |
<li><a href="#0">Home</a></li> | |
<li><a href="#0">Gallary</a></li> | |
<li><a href="#0">Posts</a></li> | |
<li><a href="#0">About</a></li> | |
<li><a href="#0">Contacts</a></li> | |
</ul> | |
</nav> | |
</div> | |
</div> |
This file contains 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
* { margin: 0; padding: 0; } | |
.bg-image { | |
background: url("http://www.batfriend.com/images/batgirl/batgirl_31.jpg") no-repeat; | |
background-size: cover; | |
width: 100vw; | |
height: 200vh; | |
background-position: top center; | |
} | |
.menubar { | |
width: 100%; | |
height: 6em; | |
position: fixed; | |
} | |
.white-blur { | |
-webkit-backdrop-filter: saturate(180%) blur(20px); | |
backdrop-filter: saturate(180%) blur(20px); | |
background-color: rgba(255, 255, 255, 0.7); | |
} | |
.black-blur { | |
-webkit-backdrop-filter: saturate(180%) blur(20px); | |
backdrop-filter: saturate(180%) blur(20px); | |
background-color: rgba(0, 0, 0, 0.8); | |
} | |
a { | |
text-decoration: none; | |
font-size: 1.2em; | |
font-family: Helvetica; | |
font-weight: 100; | |
} | |
.white-blur a { color: #333; } | |
.black-blur a { color: #eee; } | |
a:hover { color: #66f; } | |
nav { padding: 0 2em; } | |
nav ul li { | |
float: left; | |
margin-left: 1em; | |
list-style: none; | |
padding: 2.3em 0.5em; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment