Created
August 30, 2017 15:38
-
-
Save anonymous/78cb4c1791d43469eee2c313abfc2b67 to your computer and use it in GitHub Desktop.
毛玻璃
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="header"> | |
<div class="glass"> | |
<div class="content"> | |
<p>I Love You</p> | |
</div> | |
</div> | |
</div> | |
<div class="main"> | |
</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
body { | |
padding: 0; | |
margin: 0; | |
} | |
.header, | |
.glass::before { | |
background: url("http://www.allenice233.com/img/1.jpg") fixed center; | |
background-size: cover; | |
} | |
.header { | |
width: 100%; | |
height: 200px; | |
margin: 0 auto; | |
} | |
.glass { | |
position: relative; | |
width: 300px; | |
height: 150px; | |
top: 20px; | |
margin: 0 auto; | |
border-radius: 5px; | |
overflow: hidden; | |
box-shadow: 0 0 3px rgba(#000, .5); | |
&::before { | |
content: ""; | |
position: absolute; | |
left: 0; | |
top: 0; | |
right: 0; | |
bottom: 0; | |
margin: -30px; | |
z-index: 0; | |
filter: blur(15px); | |
} | |
.content { | |
position: relative; | |
z-index: 1; | |
} | |
p { | |
text-align: center; | |
font-size: 1em; | |
text-shadow: 1px 1px 2px rgba(#fff, 1); | |
} | |
} | |
.main { | |
height: 10000px; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment