html - 像苹果网站那样的过渡延迟菜单

标签 html css

<分区>


想改进这个问题吗? 通过 editing this post 添加细节并澄清问题.

关闭 7 年前

这是我的 fiddle , 我想要像 Apple 这样的精确过渡和效果移动视口(viewport)中的站点。

到目前为止,我创建了类似 apple 的东西,但我的过渡和效果与 apple 不同,我认为 apple 中的菜单链接比我的更漂亮。

   .in .atitel-menu-links li {
        opacity: 1;
        transform: translateY(0px);



        transition: transform 800ms cubic-bezier(0.19, 1, 0.22, 1) 0ms, opacity 800ms cubic-bezier(0.19, 1, 0.22, 1) 0ms;

    }

    .in .atitel-menu-links li:nth-child(1){
        transition-delay: 600ms;


    }
    .in .atitel-menu-links li:nth-child(2) {
        transition-delay: 800ms;

    }
   .in .atitel-menu-links li:nth-child(3) {
        transition-delay: 1s;

    }

    .in .atitel-menu-links li:nth-child(4){
        transition-delay: 1.3s;

    }
    .in .atitel-menu-links li:nth-child(5){
        transition-delay: 1.6s;

    }

更新: enter image description here

有什么帮助会很好吗?

谢谢

最佳答案

像这样制作你的CSS代码`

.atitel-menu-links li {
    opacity: 0;
    transform: translateY(-10px) scale(1.7);
}
.in .atitel-menu-links li {
    opacity: 1;
    transform: translateY(0px) scale(1);
    transition: transform 800ms cubic-bezier(0.19, 1, 0.22, 1) 0ms, opacity 800ms cubic-bezier(0.19, 1, 0.22, 1) 0ms;
}
.in .atitel-menu-links li:nth-child(1) {
    transition-delay: 70ms;
}
.in .atitel-menu-links li:nth-child(2) {
    transition-delay: 140ms;
}
.in .atitel-menu-links li:nth-child(3) {
    transition-delay: 210ms;
}
.in .atitel-menu-links li:nth-child(4) {
    transition-delay: 280ms;
}
.in .atitel-menu-links li:nth-child(5) {
    transition-delay: 350ms;
}

JS fiddle 在这里 http://jsfiddle.net/hLza6qa6/

虽然和苹果的菜单不完全一样但是比你的更接近

关于html - 像苹果网站那样的过渡延迟菜单,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32135493/

上一篇:html - 如何为 WHITE HEAVY CHECK MARK 特殊字符更改颜色

下一篇:javascript - 如何使用下划线 throttle 进行滚动?

相关文章:

javascript - anchor 链接不适用于 jquery event.preventDefault;

java - CSS 选择器 : Anchor text of href contains

html - 图像标题翻转的语义标记?

jquery - 使用jquery从odata wcf服务获取json

html - 在标题中创建三 Angular 形作为链接

javascript - WebWorks 应用程序根本无法运行,但可以在 Ripple 和 Chrome 以及 BB 浏览器中运行

css - 正确使用 HTML5 元素

html - 一个 div 中文本之前的图像

多个后代类型的 CSS 选择器 #example> div,p,a{}

php - 将选定的mysql数据导出到excel