Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Trying to figue out CSS animation.

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #36237
    highlight
    Member

    I am a beginning web developer and I am trying to work my way through CSS. What I want to do is create an animation of the cloud image moving slowly back and forth maybe across a quarter of the screen or less. The text will highlight when scrolled over and when clicked I was going to attempt to put a javascript pop-up window. Right now I am not sure how to incorporate the animation classes into the cloud.

    Please don’t blast me. I am still learning. I am trying to figure out the animation and I am still confused about positioning the text on the cloud image. I am not even sure if the css animation code is right for this. I was thinking there is a way to set it on a continuous loop so it will move back and forth on its own. It is beyond my skill level to figure out how to modify this code to make that happen. Please let me know if you can help. Thank you.

    Here is the fiddle:

    CSS Animate















    Subscribe








    Animate.css - http://daneden.me/animate
    LICENSED UNDER THE MIT LICENSE (MIT)

    Copyright © 2011 Dan Eden

    Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

    The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
    */

    #container {
    position: relative;
    text-align: center;
    background-color: #4c4c4c;
    height: 1000px;
    }

    #cloud {
    position: absolute;
    width: 100%;
    height: 100%;
    background: url(../images/cloud2.png) center center no-repeat;
    box-shadow: 0 5px 5px #d6d6d6;
    }

    h1 {
    font-size: 3em;
    font-family: 'Ruluko', sans-serif;
    margin: 470px auto;
    font-weight: bold;
    text-shadow: 0px 1px 0 #d6d6d6, 0 -1px 0 #000;
    }

    .animated {
    -webkit-animation-fill-mode: both;
    -moz-animation-fill-mode: both;
    -ms-animation-fill-mode: both;
    -o-animation-fill-mode: both;
    animation-fill-mode: both;
    -webkit-animation: 1s ease;
    -moz-animation: 1s ease;
    -ms-animation: 1s ease;
    -o-animation: 1s ease;
    animation: 1s ease;
    }

    .animated.hinge {
    -webkit-animation: 2s ease;
    -moz-animation: 2s ease;
    -ms-animation: 2s ease;
    -o-animation: 2s ease;
    animation: 2s ease;
    }

    @-webkit-keyframes shake {
    0%, 100% {-webkit-transform: translateX(0);}
    10%, 30%, 50%, 70%, 90% {-webkit-transform: translateX(-10px);}
    20%, 40%, 60%, 80% {-webkit-transform: translateX(10px);}
    }

    @-moz-keyframes shake {
    0%, 100% {-moz-transform: translateX(0);}
    10%, 30%, 50%, 70%, 90% {-moz-transform: translateX(-10px);}
    20%, 40%, 60%, 80% {-moz-transform: translateX(10px);}
    }

    @-ms-keyframes shake {
    0%, 100% {-ms-transform: translateX(0);}
    10%, 30%, 50%, 70%, 90% {-ms-transform: translateX(-10px);}
    20%, 40%, 60%, 80% {-ms-transform: translateX(10px);}
    }

    @-o-keyframes shake {
    0%, 100% {-o-transform: translateX(0);}
    10%, 30%, 50%, 70%, 90% {-o-transform: translateX(-10px);}
    20%, 40%, 60%, 80% {-o-transform: translateX(10px);}
    }

    @keyframes shake {
    0%, 100% {transform: translateX(0);}
    10%, 30%, 50%, 70%, 90% {transform: translateX(-10px);}
    20%, 40%, 60%, 80% {transform: translateX(10px);}
    }

    .shake {
    -webkit-animation-name: shake;
    -moz-animation-name: shake;
    -ms-animation-name: shake;
    -o-animation-name: shake;
    animation-name: shake;
    }
    #95114
    highlight
    Member

    Yes! Thanks guys. There seems to be a little hiccup, but now I can see what I am doing better. Thank you.

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘CSS’ is closed to new topics and replies.