0

I use http://daneden.me/animate

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

for animations to work.

Look the 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>

How can I include all in animated class withouth put in every class "animated"

1

2 Answers 2

1

. slideOne * {
  -webkit-animation-duration: 1s;
  animation-duration: 1s;
  -webkit-animation-fill-mode: both;
  animation-fill-mode: both;
}
<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>

1

use this:

 .slideOne * {
      //csscode 
 }
3
  • there is a . missing on your answer. it should be . slideOne
    – alebruck
    Commented May 17, 2015 at 16:10
  • 1
    While this post may answer the question, it is still a good idea to add some explanation and, possibly, some links to the relevant documentation. Answers with good explanations and references are usually more useful both to the current OP and to the future visitors. Full detailed answers are also more likely to attract positive votes. Commented May 17, 2015 at 17:02
  • @EugenePodskal You're correct. I'll do it for the next times. Thanks :)
    – Majid Sadr
    Commented May 17, 2015 at 17:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.