jQuery.smartCrop:启用真正响应的客户端图像渲染

时间:2024-07-22 10:05:33
【文件属性】:

文件名称:jQuery.smartCrop:启用真正响应的客户端图像渲染

文件大小:375KB

文件格式:ZIP

更新时间:2024-07-22 10:05:33

JavaScript

jQuery 智能裁剪 作者:格雷格·( ) 演示: 支持客户端响应式图像渲染的 jQuery 插件。 只需使用响应式 CSS 定义图像文件的宽度和高度,SmartCrop 将调整图像大小并裁剪图像以最佳匹配定义的大小。 重要提示: jQuery SmartCrop 目前是概念验证。 资源使用率目前非常高,使用的算法尚未以任何方式优化。 不建议在任何生产站点中使用此插件 用法 所有设置都是可选的。 可以使用 html5 数据属性data-focusx 、 data-focusy和data-maxreduce在每个图像的基础上覆盖 focus 和data-maxreduce 。 $('img').smartCrop({ weight : .3, // weight between color method (0) and entropy meth


【文件预览】:
jQuery.smartCrop-master
----.gitignore(485B)
----README.md(2KB)
----.gitattributes(483B)
----jQuery.smartCrop.js(30KB)
----example.jpg(175KB)
----avatar.jpg(64KB)
----index.html(5KB)
----test.jpg(141KB)

网友评论