JS 比较两张图片特效

效果如下:

代码如下:

  <body>
<script
  defer
  src="https://unpkg.com/img-comparison-slider@7/dist/index.js"
></script>
<link
  rel="stylesheet"
  href="https://unpkg.com/img-comparison-slider@7/dist/styles.css"
/>

<img-comparison-slider>
  <img slot="first" src="https://www.sbboke.com/wp-content/uploads/2022/11/8a75556ac6d24fdf8840f707eb4a31bf.png" />
  <img slot="second" src="https://www.sbboke.com/wp-content/uploads/2022/11/0ac034dbc0ef4c0784132d5a9365888c.png" />
</img-comparison-slider>
  </body>

相关文章

0 0 投票数
文章评分
订阅评论
提醒
0 评论
内联反馈
查看所有评论