Twitter bootstrap zclip&;twitter引导:不兼容?
在我开始使用twitter引导css框架之前,我一直在成功地使用zclip复制到剪贴板功能。 现在我似乎不能再使用zclip了,有人有解决办法吗 部分测试结果: 以下是我如何使用zclip:Twitter bootstrap zclip&;twitter引导:不兼容?,twitter-bootstrap,zclip,Twitter Bootstrap,Zclip,在我开始使用twitter引导css框架之前,我一直在成功地使用zclip复制到剪贴板功能。 现在我似乎不能再使用zclip了,有人有解决办法吗 部分测试结果: 以下是我如何使用zclip: $('.test').zclip({ path:"{{ asset('bundles/yopyourownpoet/flash/ZeroClipboard.swf') }}", copy: 'test', afterCopy:function(){
$('.test').zclip({
path:"{{ asset('bundles/yopyourownpoet/flash/ZeroClipboard.swf') }}",
copy: 'test',
afterCopy:function(){
alert('The poem has been copied to the clipboard.');
},
});
这适用于以下html:
<div class='test'>test</div>
测试
但每当我尝试使用图像时,它就不再起作用了,闪光灯就不会出现:
<div class='test'><img src="{{ asset('bundles/yopyourownpoet/images/Star.png') }}" alt="Star" height="100" width="100" /></div>
在我开始使用bootstrap之前,它工作得很好。。。
有没有关于使用zclip和bootstrap以及在图像上使用flash的提示?
非常感谢。经过多次尝试,我终于让它工作了。我不得不恢复到零剪贴板,不再使用zclip。 下面是正在运行的代码:
<div id="d_clip_container" style="position:relative; bottom: 25px; display: inline;">
<img id='d_clip_button' style="position:relative; top: 25px;" src="{{ asset('bundles/yopyourownpoet/images/CopyPoemPage8.png') }}" alt="Copy Poem" height="71" width="300" />
</div>
请注意,我必须使用一个技巧,容器底部25px,图像顶部25px,以便将flash内容与图像重叠
这很好,只是在悬停图像时光标并不总是变为指针
我认为这个解决方案有点可疑,所以如果有人有更好的解决方案,请分享
ZeroClipboard.setMoviePath("{{ asset('bundles/yopyourownpoet/flash/ZeroClipboard.swf') }}");
var clip = new ZeroClipboard.Client();
clip.setText( 'text to copy' );
clip.glue( 'd_clip_button', 'd_clip_container' );
clip.setHandCursor( true );