- index.html
- style.css
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<title>Diagonal Gradients</title>
<meta charset="utf-8">
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="content">
<h1>Hello, linear-gradient!</h1>
</div>
</body>
</html>
CSS
html,
body {
margin: 0;
height: 100%;
}
.content {
height: 100%;
background-color: yellow;
background-image: none;
/* Gradient colors: yellow, green */
}
h1 {
margin: 0;
padding-top: 250px;
text-align: center;
font-size: 30px;
font-family: "Georgia", serif;
}
You’ve gone to a different page
Goalscompleted
0
For .content
, set a yellow-green gradient with the following directions:
- from left to top from right to bottom
- to the upper left from the bottom right
- from the bottom left to the upper right
- to the bottom left from the upper right
Comments