我在我的 .net web 应用程序中使用了crop。所有浏览器的代码都很好。但是,IE 显示出奇怪的行为。我尝试过其他帖子,但它们要么没有帮助,要么有点像黑客。这是javascript代码:
jQuery(function ($) {
api = $('<%= "#" + target.ClientID %>').Jcrop({
onChange: showCoords,
onSelect: showCoords,
onRelease: clearCoords,
aspectRatio: 1
}, function () {
api = this;
api.setSelect([10, 10, 110, 110]);
api.setOptions({ bgFade: true });
api.ui.selection.addClass('jcrop-selection');
});
});
第一次尝试 IE 无法加载虚线,但有时在第二次尝试时它可以工作。似乎是时间问题或图像加载问题......谢谢