Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialjason chan
31,009 PointsIn the .photo:hover .overlay rule, write a transform that will move the element up 100% from its original space.
I Don't Know how my answer is wrong.
/* overlay and img transitions ---------- */
.overlay,
img {
transition: transform .6s ease-out;
}
/* overlay and img transforms ---------- */
.photo:hover .overlay {
transform: translateY(100%);
}
.photo:hover img {
}
<!DOCTYPE html>
<html>
<head>
<title>Transform Challenge</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href='https://fonts.googleapis.com/css?family=Open+Sans:400,300,600,700,800' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="page.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="container">
<div class="photo">
<img src="1.jpg" alt="Big Sur">
<div class="overlay">
<h3>Big Sur, California</h3>
<p>Big Sur is a rugged stretch of California's central coast between Carmel and San Simeon.</p>
</div>
</div>
</div>
</body>
</html>
4 Answers
jason chan
31,009 Points/* overlay and img transitions ---------- */
.overlay,
img {
transition: transform .6s ease-out;
}
/* overlay and img transforms ---------- */
.photo:hover .overlay {
transform: translateY(-100%);
}
.photo:hover img {
}
Figured it out!
Ali .
15,521 Pointsi can't fix it, can u help me PLZZ.
Keith Carrillo
6,909 PointsHey Ali Qasim try posting your code up on here, so I can check it out.
Ali .
15,521 PointsHi Keith, Thanks for your help.
my link: https://teamtreehouse.com/community/i-need-help-plzz
Saswat Purohit
2,022 Pointstry with this code .photo:hover .overlay { transform: translateY(-100%); }
Luke Buin
Front End Web Development Techdegree Student 7,114 PointsThis is the answer.
.overlay, img { transition: transform .6s ease-out; }
/* overlay and img transforms ---------- */
.photo:hover .overlay { transform: translateY(-100%)
} .photo:hover img {
}
Keith Carrillo
6,909 PointsKeith Carrillo
6,909 Points... might be a year later but man that question threw me off as well.