同位素动画从容器左上角插入

发布于 2024-11-19 13:57:48 字数 396 浏览 3 评论 0原文

对于我的同位素容器,每当我将新项目插入容器时...它最初出现在容器的左上角(因此位于第一个项目的位置),然后它通过向下移动到它应该的位置来进行动画处理根据排序去。

这是我希望发生的情况的示例: http://jsfiddle.net/aaairc/H4ZMV /5/。正如您在该示例中看到的,新项目从它将在容器中占据的位置开始放大。

我还无法复制我在 jsfiddle 本地看到的问题,但我认为有人可能会提出初步建议或指出我的 jsfiddle 示例中的内容实际上使插入具有良好的放大功能。这只是默认吗?与 CSS 有关的东西吗?

另外,不确定这是否相关,但我的同位素实例或所有 jpg 的容器项目。

For my isotope container, whenever I insert a new item into the container... it initially appears in the top-left of the container (so in the position of the first item) and then it animates by moving down into place where it should go based on sorts.

Here is an example of what I would like to happen though: http://jsfiddle.net/aaairc/H4ZMV/5/. As you see in that example, the new item zooms in starting from the position that it is going to take within the container.

I haven't been able to replicate the issue I'm seeing locally on jsfiddle yet, but I thought someone might have an initial suggestion or point me to what in my jsfiddle example is actually enabling the insert to have the nice zoom in functionality. Is that just default? Something related to the CSS?

Also, not sure if this is relevant, but the container items of my isotope instance or all jpgs.

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

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

发布评论

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

评论(2

败给现实 2024-11-26 13:57:48

这与您指定 CSS 的方式有关。当我将 CSS 更改为这个时,它按照我的预期工作。

/**** Isotope CSS3 transitions ****/

.isotope,
.isotope .isotope-item {
  -webkit-transition-duration: 0.8s;
     -moz-transition-duration: 0.8s;
          transition-duration: 0.8s;
}

.isotope {
  -webkit-transition-property: height, width;
     -moz-transition-property: height, width;
          transition-property: height, width;
}

.isotope .isotope-item {
  -webkit-transition-property: -webkit-transform, opacity;
     -moz-transition-property:    -moz-transform, opacity;
          transition-property:         transform, opacity;
}

/**** disabling Isotope CSS3 transitions ****/

.isotope.no-transition,
.isotope.no-transition .isotope-item,
.isotope .isotope-item.no-transition {
  -webkit-transition-duration: 0s;
     -moz-transition-duration: 0s;
          transition-duration: 0s;
}

/* End: Recommended Isotope styles */

/* disable CSS transitions for containers with infinite scrolling*/
.isotope.infinite-scrolling {
  -webkit-transition: none;
     -moz-transition: none;
          transition: none;
}

It had to do with how you specify the CSS. When I changed my CSS over to this it worked how I expected would like.

/**** Isotope CSS3 transitions ****/

.isotope,
.isotope .isotope-item {
  -webkit-transition-duration: 0.8s;
     -moz-transition-duration: 0.8s;
          transition-duration: 0.8s;
}

.isotope {
  -webkit-transition-property: height, width;
     -moz-transition-property: height, width;
          transition-property: height, width;
}

.isotope .isotope-item {
  -webkit-transition-property: -webkit-transform, opacity;
     -moz-transition-property:    -moz-transform, opacity;
          transition-property:         transform, opacity;
}

/**** disabling Isotope CSS3 transitions ****/

.isotope.no-transition,
.isotope.no-transition .isotope-item,
.isotope .isotope-item.no-transition {
  -webkit-transition-duration: 0s;
     -moz-transition-duration: 0s;
          transition-duration: 0s;
}

/* End: Recommended Isotope styles */

/* disable CSS transitions for containers with infinite scrolling*/
.isotope.infinite-scrolling {
  -webkit-transition: none;
     -moz-transition: none;
          transition: none;
}
冷了相思 2024-11-26 13:57:48

该功能已内置于 Isotope v1.4 中。请参阅 Metafizzy 博客:Isotope v1.4 - 改进的插入动画

This feature has been built into Isotope v1.4. See Metafizzy blog: Isotope v1.4 - refined inserting animation

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