/*覆盖半透明黑色*/:after { /*父元素需要 position: relative;*/ content: ''; background: rgba(0, 0, 0, 0.38); position: absolute; left: 0; top: 0; width: 100%; height: 100%;}