在一行中包含更多的clases

时间:2015-05-17 16:00:33

标签: html css jquery-animate

我使用http://daneden.me/animate

.animated {
  -webkit-animation-duration: 1s;
  animation-duration: 1s;
  -webkit-animation-fill-mode: both;
  animation-fill-mode: both;
}

让动画发挥作用。

看看html。

<div class="caption slideOne">                  
    <div class="capionImage animated"></div>                    
    <h1 class="captionTitle animated">Salty Spa <span class="captionSpan animated">Someseni</span></h1>                 
    <div class="breakLine animated"></div>                          
    <p class="captionParagraph animated">Terapii saline de inalta calitate si relaxare intr-o atmosfera placuta<br>alaturi de familia ta.</p><br><br><br>
    <a href="" class="sliderButton animated">Afla mai multe</a>
</div>

我怎样才能将动画课程中的所有内容都包括在内,而不是在每个课程中加入“动画”

2 个答案:

答案 0 :(得分:1)

使用它:

 .slideOne * {
      //csscode 
 }

答案 1 :(得分:1)

&#13;
&#13;
. slideOne * {
  -webkit-animation-duration: 1s;
  animation-duration: 1s;
  -webkit-animation-fill-mode: both;
  animation-fill-mode: both;
}
&#13;
<div class="caption slideOne">                  
    <div class="capionImage"></div>                    
    <h1 class="captionTitle">Salty Spa <span class="captionSpan">Someseni</span></h1>                 
    <div class="breakLine"></div>                          
    <p class="captionParagraph">Terapii saline de inalta calitate si relaxare intr-o atmosfera placuta<br>alaturi de familia ta.</p><br><br><br>
    <a href="" class="sliderButton">Afla mai multe</a>
</div>
&#13;
&#13;
&#13;