問題描述
我最近發(fā)現(xiàn)了 砌體 和 同位素 JQuery 插件.它們似乎在功能上幾乎相同,并且似乎都具有相同的作者.我能看到的唯一明顯區(qū)別是許可證.
I recently discovered the Masonry and Isotope JQuery plugins. They seem to be functionally almost identical and both appear to have the same author. The only obvious difference I can see is the license.
這兩者在功能方面的主要區(qū)別是什么?為什么要使用一個而不是另一個?
What are the main differences between these two in terms of functionality? Why would you use one over the other?
推薦答案
摘自作者訪談:
對于某些人來說,同位素看起來與您之前使用 Masonry 所做的工作非常相似;你能解釋一下主要區(qū)別嗎兩者之間?
同位素具有 Masonry 缺乏的幾個特征.砌體本質(zhì)上做一件事,將項目元素放置在級聯(lián)排列中.Isotope 內(nèi)置了 Masonry 的布局邏輯,但除此之外,它還有幾種其他的布局模式可以用來動態(tài)的位置元素.您甚至可以開發(fā)自己的自定義布局模式.
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.
正如我所提到的,它內(nèi)置了過濾和排序功能in. 過濾項目就像傳入一個 jQuery 選擇器一樣簡單:
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 充分利用了目前最好的瀏覽器功能.Isotope 沒有使用典型的左/上樣式定位,而是采用漸進(jìn)增強(qiáng)方法并在支持時使用 CSS 轉(zhuǎn)換通過瀏覽器.這為一流的性能提供了一流的性能瀏覽器.隨著硬件加速的啟動,動畫看起來很流暢在 WebKit 瀏覽器上流暢,甚至在使用 iOS 的功能較弱的設(shè)備上.CSS 轉(zhuǎn)換在 CSS 轉(zhuǎn)換中表現(xiàn)更好,我將討論稍后.
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.
另一個區(qū)別是@AminAriana 指出的許可證.Masonry 屬于 MIT 許可,但 Isotope 僅免費供個人使用.
Another difference is license as @AminAriana pointed out. Masonry is under the MIT license, but Isotope is only free for personal use.
您可以在 此頁面.
這篇關(guān)于Isotope 和 Masonry jQuery 插件之間的區(qū)別的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!