Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

How to auto start fade in an image without using :hover?

Posted on 2016-08-26
2
48 Views
Last Modified: 2016-08-29
How to auto start fade in an image without rollover a button.... thanks
0
Comment
Question by:mingchih
2 Comments
 
LVL 22

Accepted Solution

by:
Kim Walker earned 500 total points
ID: 41772627
As with your other question, CSS3 animations do not require a button. In this case, you would set up your @keyframes definition with opacity values instead of the transform in your other question. See the other question for details.

In the following CSS style, an img tag with the id fademe would begin fading 1 second after the page loads and would gradually fade away completely over a period of 5 seconds.
img#fademe {
	animation: example 5s 1s 1 forwards;
}
@keyframes example {
	0% { opacity: 1.0; }
	100% { opacity: 0; }
}

Open in new window

1
 

Author Closing Comment

by:mingchih
ID: 41775548
I probably will have more question coming up ^^
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

CSS3 Custom checkboxes This article shows how to style the checkbox form element using only CSS. Works in: Chrome, FF, Safari, Opera, IE9+ Uses modernizr.js to check for :checked pseudo class, falling back to plain old checkboxes (IE8 and bel…
This article discusses four methods for overlaying images in a container on a web page
In this tutorial viewers will learn how to style a decorative dropcap for the first letter in a paragraph using CSS. In CSS, create a new paragraph class by typing "p.fancy": Then, to style only the first letter of the first sentence, include the ps…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question