The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

CSS3 Animation

2 posters

Go down

Solved CSS3 Animation

Post by SarkZKalie September 7th 2014, 12:34 pm

Hi guys

I found this code from Google.
CSS:

Question: 

1) How can I make the code auto-change background images after 4 hours? - CSS only, i don't want to use mayny script Sad
2) About element 'background-size:cover',

I added some images in the code with 1366x768 resolution, and tried my page on a PC with 1600x900 resolution. When the background have been changed, it left a #FFF background-color on right & bottom. 
Is there anyway to fix it?

Thanks for reading, hope you can help Very Happy

Live Demo: HERE


Last edited by sarkzkalie01 on September 8th 2014, 5:13 am; edited 1 time in total
SarkZKalie
SarkZKalie
Support Moderator
Support Moderator

Male Posts : 1418
Reputation : 220
Language : English

https://rotavn.forumotion.com/

Back to top Go down

Solved Re: CSS3 Animation

Post by Ange Tuteur September 7th 2014, 6:03 pm

Hello sarkzkalie01,

It is possible to set the animation duration to a long time, however, this will be reset every time you move to another page. CSS is only able to manipulate the style of the current page, it lacks the ability to cache data or set cookies which would be necessary for what you want to do.

To have a background fit to the view point of the user, use the background-size property.
Code:
body { background-size:100% }
Ange Tuteur
Ange Tuteur
Forumaster

Male Posts : 13246
Reputation : 3000
Language : English & 日本語
Location : Pennsylvania

https://fmdesign.forumotion.com

Back to top Go down

Solved Re: CSS3 Animation

Post by SarkZKalie September 8th 2014, 5:12 am

You made my day :3 Thanks
Code:
0%  {background: url('http://i.imgur.com/Ad8dAjk.jpg');background-size:100%;}
SarkZKalie
SarkZKalie
Support Moderator
Support Moderator

Male Posts : 1418
Reputation : 220
Language : English

https://rotavn.forumotion.com/

Back to top Go down

Solved Re: CSS3 Animation

Post by Ange Tuteur September 8th 2014, 7:18 am

You're welcome

Topic archived

Have a nice day. Smile
Ange Tuteur
Ange Tuteur
Forumaster

Male Posts : 13246
Reputation : 3000
Language : English & 日本語
Location : Pennsylvania

https://fmdesign.forumotion.com

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum