图片由模糊变清楚

 

<style>
img{
    width:200px;
    height:200px;
}
</style>
<img id="img1" src="高清图片.jpg" style="display:none">
<img id="img" src="模糊图片.jpg">
<script>
    document.getElementById("img1").onload=function(){
            document.getElementById("img1").style.display="block"
            document.getElementById("img").style.display="none"
    }
</script>

 

建议https://github.com/ccforward/progressive-image

 

posted on 2017-12-20 11:26  -韩帅  阅读(100)  评论(0编辑  收藏  举报

导航