Product Launch Section, Devices (Size < 900px):Devices (Size >= 900px):
Instructions:
Use the image URL's given below.
Background color Hex Code values:
#ffdda9
Text color Hex Code values:
#8e62d9
#ffffff
#334155
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@100;400;900&display=swap" rel="stylesheet">
<title>Site</title>
</head>
<body>
<style>
* {
font-family: 'Montserrat', sans-serif;
color: white;
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
display: flex;
justify-content: flex-end;
background: url('https://assets.ccbp.in/frontend/intermediate-rwd/fairpods-blue-bg.png');
background-position: 0 0;
background-size: cover;
}
.text {
font-size: 70px;
margin-right: 50px;
text-align: center;
}
.wrapper {
display: flex;
align-items: center;
}
.airpods {
width: 300px;
}
@media screen and (max-width: 900px){
img {
width: 300px;
align-self: center;
}
body {
flex-direction: column;
background: url('https://assets.ccbp.in/frontend/intermediate-rwd/fairpods-darkpink-bg.png');
background-position: 0 0;
background-size: cover;
}
.airpods {
width: 180px;
}
.text {
margin-top: 15px;
font-size: 50px;
margin-right: 0;
}
.wrapper {
flex-direction: column;
align-items: center;
}
}
</style>
<div class="wrapper">
<div class="text">TEXT</div>
<img src="https://assets.ccbp.in/frontend/intermediate-rwd/apple-fairpods-img.png" alt="" class="airpods">
</div>
</body>
</html>
Comments
Leave a comment