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 triallovemore tshuma
12,989 PointsNext, in the .photo:hover img rule, scale the image 1.3 times its size.
hi guys ,how can i make my image 1.3 times its size ,om stuck
/* overlay and img transitions ---------- */
.overlay,
img {
transition: transform .6s ease-out;
}
/* overlay and img transforms ---------- */
.photo:hover .overlay {
}
.photo:hover img {
}
.photo:hover .overlay {
transform: translateY(-100%);
}
<!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
lovemore tshuma
12,989 Points.photo:hover img { transform: scale (1.3); }
thnx Austin,got it now
Rose Martynenko
3,385 PointsANSWER
.overlay, img { transition: transform .6s ease-out; }
/* overlay and img transforms ---------- */
.photo:hover .overlay { transform: translateY(-100%);
} .photo:hover img { transform: scale(1.3); }/apply here the needed content/
Excel Nmecha
Front End Web Development Techdegree Student 5,472 PointsI tried this and it still isn't working
Sulamita Martynenko
2,776 PointsI can't figure this out. this is what I have so far /* overlay and img transitions ---------- */
.overlay, img { transition: transform .6s ease-out; }
/* overlay and img transforms ---------- */
.photo:hover .overlay {
} .photo:hover img {
} .overlay, img { transition: transform .6s ease-out; }
someone please help me.
Austin Whipple
29,725 PointsYou'll want to use the scale()
function on the transform
property. Within that function you can provide a value of 1.3. This CSS-Tricks article has more information.