SitePoint Sponsor

User Tag List

Results 1 to 13 of 13
  1. #1
    SitePoint Wizard Another Designer's Avatar
    Join Date
    May 2005
    Posts
    1,369
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Gif Animation as Background Image?

    Hi everybody,
    Just a fast question. Can I use a gif animation as a background image in html?
    Thanks

  2. #2
    SitePoint Wizard Blake Tallos's Avatar
    Join Date
    Jun 2008
    Location
    Cuyahoga Falls, Ohio.
    Posts
    1,508
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Another Designer View Post
    Hi everybody,
    Just a fast question. Can I use a gif animation as a background image in html?
    Thanks
    hmm, thats kinda a iffy question.I mean whats the gif animation look like?I usually dont set my background images in the html.I set all background images in the CSS document.Is their animation going on in the Gif file?Because alot of people can save images as .Gif Files without giving them Animation.
    Blake Tallos - Software Engineer for Sanctuary
    Software Studio, Inc. C# - Fanatic!
    http://www.sancsoft.com/


  3. #3
    Design Your Site Team bronze trophy Erik J's Avatar
    Join Date
    May 2007
    Location
    Countryside, Sweden
    Posts
    3,407
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Another Designer
    Just a fast question. Can I use a gif animation as a background image in html?
    Yes, you can use an animated GIF as an animated background cross-browser in the CSS, if I understand your question right.
    Happy ADD/ADHD with Asperger's

  4. #4
    SitePoint Enthusiast D3niss3's Avatar
    Join Date
    Sep 2008
    Location
    RP
    Posts
    49
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by erik.j View Post
    Yes, you can use an animated GIF as an animated background cross-browser in the CSS, if I understand your question right.
    That's how I understood his question as well.

    So basically YES, you can use.

  5. #5
    Non-Member
    Join Date
    Jun 2008
    Posts
    159
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yes you can.

  6. #6
    SitePoint Wizard Another Designer's Avatar
    Join Date
    May 2005
    Posts
    1,369
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    The background image is in an embedded CSS tag through Dreamweaver.

    Thank you for the feedback.

  7. #7
    SitePoint Member
    Join Date
    Dec 2008
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    it will take longer for your page to load if you'll do that.

  8. #8
    om nom nom nom Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,233
    Mentioned
    47 Post(s)
    Tagged
    1 Thread(s)
    The background image is in an embedded CSS tag through Dreamweaver.
    This is the Way of Evil, just so you know.

    Hyperjeds is right in that bg images load slower (actually, last) than HTML <img>s but Stu Nichols has done some pretty fun stuff with animated background which only appear on :hover or :focus. Google it.

  9. #9
    SitePoint Member marakas's Avatar
    Join Date
    Mar 2009
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yep you can indeed, this is what I used to place an animated ajax loading gif on the page :

    background-image: url("ajax-loader.gif");
    background-repeat: no-repeat;

  10. #10
    SitePoint Member
    Join Date
    Mar 2009
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Another Designer View Post
    Hi everybody,
    Just a fast question. Can I use a gif animation as a background image in html?
    Thanks
    Yes is the answer, you can also do an experiment...

  11. #11
    Follow: @AlexDawsonUK silver trophybronze trophy AlexDawson's Avatar
    Join Date
    Feb 2009
    Location
    England, UK
    Posts
    8,111
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    Animated background images? Surely that is counterproductive as it will draw the visitor away from your content with all the visual “flashy” stuff going on in the background.

  12. #12
    SitePoint Enthusiast
    Join Date
    Mar 2009
    Posts
    98
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by hyperjedz View Post
    it will take longer for your page to load if you'll do that.
    Depends on the size of the image you could also apply some code that the web page loads before the image or that the image only loads ...kb a second

  13. #13
    SitePoint Wizard bronze trophy Black Max's Avatar
    Join Date
    Apr 2007
    Posts
    4,029
    Mentioned
    12 Post(s)
    Tagged
    0 Thread(s)
    You can, as so many have already said, but you really want to be careful. I remember a site a teacher created for her classroom that used a tiling GIF of a biplane swooping at the viewer. When looking at the site, with the tiling and the animation, I felt like a bug being strafed by Snoopy's Sopwith Camel. Impossible to use the site for anything except induced vomiting.


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
  •