首页 \ 问答 \ 为什么我的CSS动画不会同时运行?(Why don't my CSS animations run simultaneously?)

为什么我的CSS动画不会同时运行?(Why don't my CSS animations run simultaneously?)

我正在研究概念证明。 我试图使用HTML和CSS复制Tinder UX,这是我的链接: CodePen

问题是我有两个主要的动画,它们应该相互并行运行。 但他们一个接一个地按顺序运行。 有没有办法同时运行它们?

个人资料图片动画。

    .tinder-profile
    {
      -webkit-animation: avatar 0.8s;
              animation: avatar 0.8s;
    }

    @keyframes avatar {
        0% {
        -webkit-transform: scale(0.8, 0.8);
                transform: scale(0.8, 0.8);
      }
      60% {
        -webkit-transform: scale(1.1, 1.1);
            transform: scale(1.1, 1.1);

      }
      100% {
        -webkit-transform: scale(1, 1);
                transform: scale(1, 1);

      }
    }

    

和背景中的脉冲圈:

<pre>
.tinder-ping1{
  -webkit-animation: ping 3s ease-in-out infinite;
          animation: ping 3s ease-in-out infinite;
  z-index:9;
}
@keyframes ping {
  0% {
    -webkit-transform: scale(0, 0);
            transform: scale(0, 0);
    opacity: 0.0;
  }
  40% {
    opacity: 1.0;
  }
  100% {
    -webkit-transform: scale(1.1, 1.1);
        transform: scale(1.1, 1.1);
    opacity: 0.0;
  }
}
</pre>

这是EditPen的链接,您可以在其中查看所有代码: CodePen


I am working on a proof of concept. I am trying to duplicate Tinder UX using HTML and CSS, here's my link: CodePen

The problem is that I have two main animations which should run in parallel with each other. But they run sequentially, one after another. Is there a way to run them at the same time?

animation on profile picture.

    .tinder-profile
    {
      -webkit-animation: avatar 0.8s;
              animation: avatar 0.8s;
    }

    @keyframes avatar {
        0% {
        -webkit-transform: scale(0.8, 0.8);
                transform: scale(0.8, 0.8);
      }
      60% {
        -webkit-transform: scale(1.1, 1.1);
            transform: scale(1.1, 1.1);

      }
      100% {
        -webkit-transform: scale(1, 1);
                transform: scale(1, 1);

      }
    }

    

and pulsing circles in the background:

<pre>
.tinder-ping1{
  -webkit-animation: ping 3s ease-in-out infinite;
          animation: ping 3s ease-in-out infinite;
  z-index:9;
}
@keyframes ping {
  0% {
    -webkit-transform: scale(0, 0);
            transform: scale(0, 0);
    opacity: 0.0;
  }
  40% {
    opacity: 1.0;
  }
  100% {
    -webkit-transform: scale(1.1, 1.1);
        transform: scale(1.1, 1.1);
    opacity: 0.0;
  }
}
</pre>

Here is a link to the EditPen, where you can see all the code: CodePen


原文:https://stackoverflow.com/questions/27929715
更新时间:2021-12-06 18:12

最满意答案

跟踪运行gem install -V --backtrace --debug haml (谢谢zzzhc)并仔细查看/home/mark/.gem目录后,我发现没有安装gems,只有gemspec文件和宝石源文件。 本着实验的精神,我删除了/home/mark/.gem并重新运行了gem install命令,并突然它正在工作。 而且它已经为我刚刚安装的宝石重新创建了包含gemspecs的/home/mark/.gem

现在很明显,我错误地解释了原始问题中的错误信息; 在尝试将gem安装到/home/mark/.gem ,rubygems没有失败,它只是将该目录用作临时存储将要安装的新下载的gems的gemspec。 在安装rvm之前,我一直使用sudo gem install...sudo gem install...到系统上sudo gem install...这会使用root权限创建/home/mark/.gem目录。 所以rubygems在没有sudo情况下运行,无法访问临时目录来存储gemspecs,并在安装gem之前中止。 卫生署!


Following up the backtrace from running gem install -V --backtrace --debug haml (thanks zzzhc) and taking a closer look at the /home/mark/.gem directory I found that there were no gems installed there, just gemspec files and gem source files. In the spirit of experimentation I deleted /home/mark/.gem and re ran the gem install command and suddenly it was working. And that it had recreated /home/mark/.gem containing gemspecs for the gems I'd just installed.

It's clear now that I'd misinterpreted the error message in the original question; rubygems didn't fail while trying to install gems to /home/mark/.gem, it was simply using that directory as a temporary store for the gemspecs of newly downloaded gems about to be installed. Before installing rvm I'd been installing gems onto the system using sudo gem install... which would have created the /home/mark/.gem directory with root permissions. So rubygems run without sudo was unable to access the temp directory to store gemspecs in and was aborting before it could install the gems. Doh!

相关问答

更多
  • RVM 1.6.9现在已经很老了。 你是否通过一些软件包管理器来安装它? 如果是这样,摆脱它,并在你的bash外壳中运行以下内容: curl -L https://get.rvm.io | bash -s stable 然后,放置[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" ~/.profile [[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" ~/ ...
  • sudo apt-get -y update sudo apt-get -y install build-essential zlib1g-dev libssl-dev libreadline6-dev libyaml-dev cd /tmp wget http://ftp.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p451.tar.gz tar -xvzf ruby-2.0.0-p451.tar.gz cd ruby-2.0.0-p451/ ./configure --p ...
  • 您正在运行过时的RVM版本。 您应该使用http://rvm.io上介绍的建议安装路径,并且不要使用软件包安装程序。 要修复此检查,请访问https://stackoverflow.com/a/9056395/497756 。 也不要使用1.9.2而不是使用当前的1.9.3 ruby而对于新项目使用在RC1中的2.0.0并且应该很快发布。 You're running an outdated version of RVM. You should go with the recommended install ...
  • 我强烈建议你使用官方网站来安装RVM: https : //rvm.io/rvm/install 你的问题是当你打开一个新的终端时,RVM没有被加载,这就是为什么你必须在终端的每个实例上手动添加源代码的原因。 要解决这个问题 ,请运行以下命令行:( 如果使用登录shell ) echo "source $HOME/.rvm/scripts/rvm" >> ~/.bash_profile 或者这个( 如果使用非登录shell ): echo "source $HOME/.rvm/scripts/rvm" > ...
  • 这是一个可怕的教程! 无需安装gitosis包。 卸载它,只是不打扰该行,你应该没事。 同样,您不应该安装apache等。 坚持使用git-core和gitk如果你想在以后的git -stuff中使用UI。 (不太确定ubuntu软件包名称,因为我不使用它) 你也可以从github下载安装文件,但是git太棒了我不推荐。 如果您需要最新版本,可以随时进行源安装。 只需确保在config.mak设置一些内容即可禁用可在Makefile中找到的功能。 你基本上想要禁用除OpenSSL之外的所有东西。 您将需要O ...
  • 跟踪运行gem install -V --backtrace --debug haml (谢谢zzzhc)并仔细查看/home/mark/.gem目录后,我发现没有安装gems,只有gemspec文件和宝石源文件。 本着实验的精神,我删除了/home/mark/.gem并重新运行了gem install命令,并突然它正在工作。 而且它已经为我刚刚安装的宝石重新创建了包含gemspecs的/home/mark/.gem 。 现在很明显,我错误地解释了原始问题中的错误信息; 在尝试将gem安装到/home/ma ...
  • 我安装了ruby,但事实证明它没有设置在rvm中。 要解决这个问题,我首先尝试使用rvm use ruby --default ,但我得到了臭名昭着的“rvm不是函数”错误。 要解决这个问题,首先运行bash --login ,然后rvm use ruby --default运行rvm use ruby --default 。 完成这些步骤后,您可以继续安装rubygems。 I had ruby installed, but turns out it was not set in rvm. To fix ...
  • 在你的~/.bashrc文件中,在底部粘贴这一行: source "$HOME/.rvm/scripts/rvm" 然后重新启动终端会话,您应该能够通过RVM进行gem install 。 In your ~/.bashrc file paste this line at the bottom: source "$HOME/.rvm/scripts/rvm" Then restart your terminal session, and you should be able to gem install ...
  • 在这里看到我的答案。 你需要添加 set shell=/bin/bash\ -i 到你的~/.vimrc 。 See my answer here. You need to add set shell=/bin/bash\ -i to your ~/.vimrc.
  • 问题来自你的Gemfile, 1)你需要将gem 'rvm-capistrano'移动到开发组 - 这样它就不会安装到shared/bundle 。 2)你有没有机会使用gem 'rvm-capistrano', :lib => 'rvm/capistrano' ,lib部分不是必需的,实际上很可能是破坏了东西。 在再次部署之前,您应该清除服务器上的shared/bundle 。 the problem comes from your Gemfile, 1) you need to move gem 'rv ...

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)