【问题标题】:Jquery Jcrop SelectionJquery Jcrop 选择
【发布时间】:2012-06-25 10:55:39
【问题描述】:

不知道我的 jcrop 选择中发生了什么。我想我按下了键盘上的一些键,使选择的句柄从正方形变成了点。我使用 mozilla firefox 作为我的浏览器。



原始手柄必须呈方形,如下所示。

【问题讨论】:

    标签: jquery jcrop


    【解决方案1】:

    方块是css的一部分。自带的默认css是这样的:

    .jcrop-holder{direction:ltr;text-align:left}
    .jcrop-vline,.jcrop-hline{background:#FFF url(Jcrop.gif) top left repeat;font-size:0;position:absolute}
    .jcrop-vline{height:100%;width:1px!important}
    .jcrop-hline{height:1px!important;width:100%}
    .jcrop-vline.right{right:0}
    .jcrop-hline.bottom{bottom:0}
    .jcrop-handle{background-color:#333;border:1px #eee solid;font-size:1px}
    .jcrop-tracker{-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none;-webkit-user-select:none;height:100%;width:100%}
    .jcrop-handle.ord-n{left:50%;margin-left:-4px;margin-top:-4px;top:0}
    .jcrop-handle.ord-s{bottom:0;left:50%;margin-bottom:-4px;margin-left:-4px}
    .jcrop-handle.ord-e{margin-right:-4px;margin-top:-4px;right:0;top:50%}
    .jcrop-handle.ord-w{left:0;margin-left:-4px;margin-top:-4px;top:50%}
    .jcrop-handle.ord-nw{left:0;margin-left:-4px;margin-top:-4px;top:0}
    .jcrop-handle.ord-ne{margin-right:-4px;margin-top:-4px;right:0;top:0}
    .jcrop-handle.ord-se{bottom:0;margin-bottom:-4px;margin-right:-4px;right:0}
    .jcrop-handle.ord-sw{bottom:0;left:0;margin-bottom:-4px;margin-left:-4px}
    .jcrop-dragbar.ord-n,.jcrop-dragbar.ord-s{height:7px;width:100%}
    .jcrop-dragbar.ord-e,.jcrop-dragbar.ord-w{height:100%;width:7px}
    .jcrop-dragbar.ord-n{margin-top:-4px}
    .jcrop-dragbar.ord-s{bottom:0;margin-bottom:-4px}
    .jcrop-dragbar.ord-e{margin-right:-4px;right:0}
    .jcrop-dragbar.ord-w{margin-left:-4px}
    .jcrop-light .jcrop-vline,.jcrop-light .jcrop-hline{background:#FFF;filter:Alpha(opacity=70)!important;opacity:.70!important}
    .jcrop-light .jcrop-handle{-moz-border-radius:3px;-webkit-border-radius:3px;background-color:#000;border-color:#FFF;border-radius:3px}
    .jcrop-dark .jcrop-vline,.jcrop-dark .jcrop-hline{background:#000;filter:Alpha(opacity=70)!important;opacity:.7!important}
    .jcrop-dark .jcrop-handle{-moz-border-radius:3px;-webkit-border-radius:3px;background-color:#FFF;border-color:#000;border-radius:3px}
    .jcrop-holder img,img.jcrop-preview{max-width:none}
    

    您还需要 Jcrop.gif 文件,该文件也是 Jcrop 下载的一部分 - 对于上述 css,它需要与 css 位于同一文件夹中。所以我怀疑 gif 或 css 现在超出了范围

    【讨论】:

    • 感谢您立即回答我的问题。但是我的 jcrop 的 css 文件所在的文件夹中已经有了 Jcrop.gif。
    • 我已经在firebug中检查了css面板中的jcrop.gif,但图像已成功加载。我不认为 .gif 是问题..
    • 我已经解决了这个问题。这是我在网上下载的版本。似乎我在互联网上下载的 css 是最新的,而我从 Jquery: Novice to Ninja 2nd Edition 中阅读的内容则较旧。呵呵。多谢。你应该得到一个公认的答案。 :-D
    • 在你的 jcrop.css 文件中添加这个 css。它为我解决了这个问题。谢谢。 :D
    猜你喜欢
    • 2014-01-22
    • 2023-03-16
    • 2011-02-01
    • 1970-01-01
    • 2010-09-25
    • 2012-09-12
    • 2018-03-14
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多