我正在使用 Rails,并尝试实现CSS3 Animations Cheat Sheet。
我添加animations.css
到vender/assets/stylesheets
. 我添加*= require animations
到application.css
. 我添加@import "animations";
到home.css.scss
.
相关元素是<%= image_tag("pitt.png", size: "336x440", class: "slideLeft", id: "picture") %>
。这是它的css样式home.css.scss
:
#picture {
margin-top: 10px;
margin-left: 20px;
border: 3px solid rgba(255, 165, 0, 0.4);
border-radius: 10px;
padding-bottom: 10px;
visibility: hidden;
}
这导致没有动画。图像甚至没有隐藏。但是,如果我创建类 pullDown 而不是 slideLeft,则该元素将被隐藏,但它不会通过动画出现(它根本不会出现)。
我能做些什么来解决这个问题?
编辑:
animations.css
= http://www.justinaguilar.com/animations/css/animations.css
application.css
/*
* This is a manifest file that'll be compiled into application.css, which will include all the files
* listed below.
*
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
*
* You're free to add application-wide styles to this file and they'll appear at the top of the
* compiled file, but it's generally better to create a new file per style scope.
*
*= require jquery.ui.all
*= require jquery-ui/smoothness
*= require bootstrap
*= require animations
*= require_self
*= require_tree .
*/