Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 2 of 2
  1. #1
    Junior Member
    Join Date
    May 2014
    Posts
    1
    Member #
    39221

    Problem with CSS hover/fade images and transitions

    Hi all,

    I'm new here and am working through a problem I'm having. I'm trying to a four-image fade transition on a website that I'm doing; but I can't get the div area to line up within a certain area - it always extends over the other parts of the page.


    What am I doing wrong? -ryan

    Code snippets below:

    HTML:
    <div class="image">
    <div id= "crossfade">
    <img src = "http://www.webdesignforums.net/forum/images/2008 019.JPG" alt = "png" width="570" height="330" class = "cone">
    <img src = "http://www.webdesignforums.net/forum/images/rockingchair460.jpg" alt = "png" width="570" height="330" class = "ctwo">
    <img src = "http://www.webdesignforums.net/forum/images/2008 009.JPG" alt = "png" width="570" height="330" class = "cthree"><img src = "http://www.webdesignforums.net/forum/images/porch-with-guitar.jpg" alt = "png" width="570" height="330" class = "cfour" /></div>
    </div><!--close image-->


    CSS:
    #crossfade > img {
    width: 45%;
    height: 55%;
    position: absolute;
    top: 180px;
    left: 502px;
    color: transparent;
    opacity: 0;
    z-index: 0;
    -webkit-backface-visibility: hidden;
    -webkit-animation: imageAnimation 30s linear infinite 0s;
    -moz-animation: imageAnimation 30s linear infinite 0s;
    -o-animation: imageAnimation 30s linear infinite 0s;
    -ms-animation: imageAnimation 30s linear infinite 0s;
    animation: imageAnimation 30s linear infinite 0s;
    }

    #crossfade > img:nth-child(2) {
    background-image: url(../images/2.jpg);
    -webkit-animation-delay: 6s;
    -moz-animation-delay: 6s;
    -o-animation-delay: 6s;
    -ms-animation-delay: 6s;
    animation-delay: 6s;
    }
    #crossfade > img:nth-child(3) {
    background-image: url(../images/3.jpg);
    -webkit-animation-delay: 12s;
    -moz-animation-delay: 12s;
    -o-animation-delay: 12s;
    -ms-animation-delay: 12s;
    animation-delay: 12s;
    }
    #crossfade > img:nth-child(4) {
    background-image: url(../images/4.jpg);
    -webkit-animation-delay: 18s;
    -moz-animation-delay: 18s;
    -o-animation-delay: 18s;
    -ms-animation-delay: 18s;
    animation-delay: 18s;
    }
    #crossfade > img:nth-child(5) {
    background-image: url(../images/5.jpg);
    -webkit-animation-delay: 24s;
    -moz-animation-delay: 24s;
    -o-animation-delay: 24s;
    -ms-animation-delay: 24s;
    animation-delay: 24s;
    Last edited by ry1633; May 19th, 2014 at 09:26 PM.

  2.  

  3. #2
    Junior Member Danielpixelz.com's Avatar
    Join Date
    May 2014
    Location
    Germany
    Posts
    17
    Member #
    39215
    Why are you using instyle-proporties for the image's width/height?

    For instance: <img src = "http://www.webdesignforums.net/forum/images/2008 019.JPG" alt = "png" width="570" height="330" class = "cone">


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 06:56 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com