先看一下效果图
废话不多说直接上代码
<!DOCTYPE html>
<html><head><meta charset="utf-8"><title></title><style lang="scss">img {-webkit-box-reflect: below 0px -webkit-linear-gradient(bottom, rgba(255,255,255,0.3) 0%, transparent 40%, transparent 100%);}</style></head><body><img src="img/1.JPEG" alt=""></body>
</html>
完事!其实很简单就是运用了渐变的原理.
欲成大树不与草争,将军有剑不斩苍蝇