Results 1 to 4 of 4

Thread: Making a DIV fade in?

  1. #1
    Join Date
    Aug 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Making a DIV fade in?

    Is it possible, I have looked around, yet nothing.

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Yes. http://www.twey.co.uk/?q=fading

    You could do something similar yourself, by lowering/increasing the opacity at a set interval in a loop.
    Last edited by djr33; 08-25-2007 at 10:23 PM. Reason: typo
    Daniel - Freelance Web Design | <?php?> | <html>| espa˝ol | Deutsch | italiano | portuguŕs | catalÓ | un peu de franšais | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  3. #3
    Join Date
    Jun 2006
    Location
    Acton Ontario Canada.
    Posts
    677
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default

    Code:
    ... Miscillaneous head section junk ...
    <script type="text/javascript">
    var per=0.01;
    function repeat() {
      if (per<1) {
        document.getElementById("hugteim").style.opacity=per;
        per+=0.01;
      };
      document.getElementById("hugteim").style.opacity=per;
      setTimeout("repeat()",100);
    }
    </script>
      </head>
      <body onload="repeat()">
    <div id="hugteim">THIS SHOULD FADE IN</div>
    ... rest of body ...
    EDIT oops, i should reply quicker...
    - Ryan "Boxxertrumps" Trumpa
    Come back once it validates: HTML, CSS, JS.

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Just adding a note here:

    Applying any filter to text in IE 7 for any purpose, including fading it in or out will make it look odd. Text can (in many cases) be faded in and out in any browser by gradually changing its color style value in relation to its background color style value.

    In situations where images are involved, fade the image, not the text, to avoid this filter bug in IE 7.

    There are situations where neither of these workarounds will be applicable. Then you are faced with either excluding IE 7 from the effect or living with the noticeably inferior text rendering quality of the text being filtered.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •