右边的那个复制的按钮是个flash,为什么呢?
只是一个font icon啊
不好意思,是我自己没看清楚,是有用到flash
,@llffzzk 说的对,github用的是这个插件:zeroclipboard
This library is fully compatible with Flash Player 11.0.0 and above,
which requires that the clipboard copy operation be initiated by a
user click event inside the Flash movie. This is achieved by
automatically floating the invisible movie on top of a DOM element of
your choice. Standard mouse events are even propagated out to your DOM
element, so you can still have rollover and mousedown effects with
just a little extra effort.
10 回答11.2k 阅读
5 回答4.9k 阅读✓ 已解决
4 回答3.1k 阅读✓ 已解决
2 回答2.8k 阅读✓ 已解决
3 回答2.4k 阅读✓ 已解决
3 回答2.2k 阅读✓ 已解决
2 回答2.6k 阅读✓ 已解决
出于安全考虑,默认浏览器不能访问剪切板,需要开启才行,但是不是所有人都知道都会这么做,所以用了flash解决这个问题,flash可以访问