body { min-height: 100vh; box-sizing: border-box; margin: 0; padding-top: calc(50vh - 6em); font: 150%/1.6 serif; background: url("iphone.jpg") fixed 0 center; background-size: cover; } main { margin: 0 auto; padding: 1em; max-width: 30em; border-radius: .3em; box-shadow: 0 0 0 1px hsla(0,0%,100%,.3) inset, 0 .5em 1em rgba(0, 0, 0, 0.6); text-shadow: 0 1px 1px hsla(0,0%,100%,.3); background: hsla(0,0%,100%,.3); } <main>……</main> |
body { … background: url("iphone.jpg") fixed 0 center; background-size: cover; } main { … background: hsla(0,0%,100%,.3); } |
main { … -webkit-filter: blur(3px); filter: blur(3px); } |
main { position: relative; … } main::before { content: ''; position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: -1; -webkit-filter: blur(20px); filter: blur(20px); background: rgba(255,0,0,.5); } |
main { … overflow: hidden; } main::before { … margin: -30px; } |