Skip to content

Instantly share code, notes, and snippets.

@mercer08
Last active August 4, 2017 12:28
Show Gist options
  • Save mercer08/b29aa2d581d7c5212fb73e8e83353778 to your computer and use it in GitHub Desktop.
Save mercer08/b29aa2d581d7c5212fb73e8e83353778 to your computer and use it in GitHub Desktop.
通过阴影来弱化背景(rgba) CSS SECRET
.overlay{ /*用于遮挡背景*/
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
background: rgba(0,0,0,.8);
}
.lightbox{ /*用于吸引用户注意的元素*/
position: absolute;
z-index: 1;
/*其余样式*/
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment