为什么我的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
最满意答案
跟踪运行
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 thegem 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 usingsudo gem install...
which would have created the/home/mark/.gem
directory with root permissions. Sorubygems
run withoutsudo
was unable to access the temp directory to store gemspecs in and was aborting before it could install the gems. Doh!
相关问答
更多-
使用RVM,但不能设置当前的Ruby版本(Ubuntu 11.10)(Using RVM, but can't set current Ruby version (Ubuntu 11.10))[2022-04-29]
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 ...
-
Ubuntu的rvm安装问题(Ubuntu rvm setup issue)[2022-04-11]
我强烈建议你使用官方网站来安装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 ...
-
Ubuntu下的rvm ruby gems(未能)安装在错误的位置(ruby gems under rvm on Ubuntu (failing to) install in the wrong location)[2022-02-16]
跟踪运行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 ...
-
使用RVM安装Ruby后,Ubuntu找不到“gems”包(Ubuntu cannot find “gems” package after installing Ruby with RVM)[2022-10-09]
在你的~/.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 ... -
让Vim看到RVM ubuntu(Make Vim see RVM ubuntu)[2021-11-20]
在这里看到我的答案。 你需要添加 set shell=/bin/bash\ -i 到你的~/.vimrc 。 See my answer here. You need to add set shell=/bin/bash\ -i to your ~/.vimrc. -
Ubuntu上的Rails3.2 + Passenger3 + Apache2 + RVM(Rails3.2+Passenger3+Apache2+RVM on Ubuntu)[2023-10-03]
问题来自你的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 ...