?
Solved

Unsmooth CSS transition question

Posted on 2014-11-15
2
Medium Priority
?
135 Views
Last Modified: 2014-11-15
When I hover my mouse over the gray div area, the initial expansion is a very quick jerk. But it slowly decreases in size after a mouseout. My objective is to achieve a smooth transition both ways, i.e., expansion and collapse. Can anyone please tell me what I'm lacking with my code? Thanks.

<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>Test</title>
<style>
div {
	background: rgba(220,216,216,1.00);
	width: 400px;
	height: 295px;
	margin: 0 auto;
	overflow: hidden;
	transition: all 2s ease;
}
div:hover {
	height: 100%;
}
</style>
</head>

<body>
	<div>
    	This is an expanding div box. This is an expanding div box. This is an expanding div box. This is an expanding div box. This is an expanding div box. This is an expanding div box. This is an expanding div box. This is an expanding div box. This is an expanding div box. This is an expanding div box. This is an expanding div box. This is an expanding div box. This is an expanding div box. This is an expanding div box. This is an expanding div box. This is an expanding div box. This is an expanding div box. This is an expanding div box. This is an expanding div box. This is an expanding div box. This is an expanding div box. This is an expanding div box. This is an expanding div box. This is an expanding div box. This is an expanding div box. This is an expanding div box. This is an expanding div box. This is an expanding div box. This is an expanding div box. This is an expanding div box. This is an expanding div box. This is an expanding div box. This is an expanding div box. This is an expanding div box. This is an expanding div box. This is an expanding div box. This is an expanding div box. This is an expanding div box. This is an expanding div box. This is an expanding div box. This is an expanding div box. This is an expanding div box. This is an expanding div box. This is an expanding div box.  
    </div>
</body>
</html>

Open in new window

0
Comment
Question by:elepil
[X]
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
2 Comments
 
LVL 58

Accepted Solution

by:
Gary earned 2000 total points
ID: 40445122
Don't use 100% - use a set height for the hover.
0
 

Author Closing Comment

by:elepil
ID: 40445128
THANKS!
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

719 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