- index.html
- style.css
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<title>Color Proportions and Color Stops</title>
<meta charset="utf-8">
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="flag"></div>
</body>
</html>
CSS
body {
background-color: #f5f5f5;
}
.flag {
margin: 100px auto;
width: 360px;
height: 240px;
background-image: none;
box-shadow: 1px 1px 3px #333333;
}
You’ve gone to a different page
Goalscompleted
0
- First, set a “top to bottom” linear gradient for
.flag
consisting of four colors:#ffffff
,#1199ff
,#0039a6
,#d52b1e
. - Then assign the following positions for these colors:
25%
,50%
,75%
and100%
.
Comments