这篇文章主要为大家详细介绍了vue实现简单放大镜效果,文中示例代码介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们可以参考一下
本文实例为大家分享了vue实现简单放大镜效果的具体代码,供大家参考,具体内容如下
<div> <div class="imgMerror"> <div class="smallDiv"> <div class="imgMask"></div></div><div class="bigDiv"> </div></div></div> *{ margin: 0; padding: 0; } .imgMerror{ position: relative; padding: 50px; .smallDiv{ border: 1px solid #ccc; width: 360px; height: 360px; position: relative; left: 0; top: 0; img{ width: 100%; height: 100%; } .imgMask{ width: 240px; height: 240px; background: #00ff98; opacity: 0.5; cursor: move; position: absolute; left:0; top: 0; display: none; }<em>本文来源[email protected]搞@^&代*@码)网5</em> } .bigDiv{ border: 1px solid #ccc; width: 540px; height: 540px; position: relative; left: 380px; top: -360px; overflow: hidden; display: none; img{ width: 600px; height: 600px; position: absolute; left: 0; top: 0; } } }
效果图:
以上就是vue实现简单放大镜效果的详细内容,更多请关注gaodaima搞代码网其它相关文章!