Isotope 和 Masonry jQuery 插件之间的差异

发布于 2024-12-26 12:01:34 字数 1435 浏览 2 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

念﹏祤嫣 2025-01-02 12:01:34

作者采访摘录:

对于某些人来说,同位素看起来与您之前使用 Masonry 所做的工作非常相似;你能解释一下主要的区别吗
两者之间?

同位素具有砌体所缺乏的几个功能。本质上是砌体
做一件事,将项目元素放置在级联排列中。
Isotope 内置了 Masonry 的布局逻辑,但除此之外,它还
还有其他几种布局模式可用于动态
位置元素。您甚至可以开发自己的自定义布局模式。

正如我所提到的,它内置了过滤和排序功能
过滤项目就像传入 jQuery 选择器一样简单:

$('#container').isotope({ filter: '.my-selector' });

Isotope 利用了最好的浏览器功能。
同位素没有使用典型的左/上样式定位,而是采用了
渐进增强方法并使用 CSS 转换(如果支持)
通过浏览器。这为一流的产品提供了一流的性能
浏览器。随着硬件加速的启动,动画看起来如丝般柔滑
在 WebKit 浏览器上运行流畅,甚至在使用 iOS 的功能较弱的设备上也能流畅运行。
CSS 变换通过 CSS 过渡效果更好,我将对此进行讨论
稍后。

另一个区别是许可,正如@AminAriana 指出的那样。 Masonry 遵循MIT 许可,但Isotope免费供个人使用

您可以在 同位素商业许可证购买(25 美元)。 co/#isotope-license">此页面。

An excerpt from the interview with the author:

To some people Isotope would look very similar to the work you had previously done with Masonry; can you explain the main differences
between the two?

Isotope has several features that Masonry lacks. Masonry essentially
does one thing, placing item elements in a cascading arrangement.
Isotope has Masonry’s layout logic built in, but in addition, it also
has several other layout modes that can be used to dynamically
position elements. You can even develop your own custom layout mode.

As I’ve mentioned, it has filtering and sorting functionality built
in. Filtering items is as easy as passing in a jQuery selector:

$('#container').isotope({ filter: '.my-selector' });

Isotope takes advantage of the best browser features out there.
Instead of using typical left/top styles positioning, Isotope takes a
progressive enhancement approach and uses CSS transforms if supported
by the browser. This provides for top-notch performance for top-notch
browsers. With hardware acceleration kicking in, animations look silky
smooth on WebKit browsers, and even less-powerful devices using iOS.
CSS transforms perform better with CSS transitions, which I’ll discuss
later.

Another difference is license as @AminAriana pointed out. Masonry is under the MIT license, but Isotope is only free for personal use.

You can buy (25$) Isotope commercial license on this page.

叹沉浮 2025-01-02 12:01:34

PrimosK 几乎回答了你的问题,但我只是想插话......

Isotope 是一个很棒的 jQuery 插件。我已经在多个网站上成功使用了它。

我最喜欢同位素的事情之一是它的可定制性。它有很好的文档记录,几乎可以做任何您能想到的事情,例如通过无限滚动扩展它并使用自定义布局模式。

PrimosK pretty much answared you question, but I just wanted to chime in ...

Isotope is an awesome jQuery plugin. I've successfully used it on multiple sites.

One of the things I like most about Isotope is how customizable it is. It's well documented and it can do almost anything you can think of like extending it with infinite scroll and use custom layout modes.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文