Task 1
<!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">
<title>Test Box Model 1</title>
<style>
.box {
border: 5px solid rebeccapurple;
background-color: lightgray;
padding: 40px;
margin: 40px;
width: 300px;
height: 150px;
}
.alternate {
box-sizing: border-box;
width: 390px;
}
</style>
</head>
<body>
<div class="box">
I use the standard box model.
</div>
<div class="box alternate">
I use the alternate box model.
</div>
</body>
</html>
Task 2
<!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">
<title>Test Box Model 2</title>
<style>
.box {
border: 5px dotted #333;
margin: 20px 1em 40px 2em;
padding: 1em;
}
</style>
</head>
<body>
<div class="box">I use the standard box model.</div>
</body>
</html>
Task 3
<!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">
<title>Test Box Model 3</title>
<style>
.box span {
background-color: pink;
border: 5px solid black;
padding: 1em;
display: inline-block;
}
</style>
</head>
<body>
<div class="box">
<p>
Veggies es bonus vobis,
<span>proinde vos postulo</span>
essum magis kohlrabi welsh onion daikon amaranth tatsoi
tomatillo melon azuki bean garlic.
</p>
<p>
Gumbo beet greens corn soko endive gumbo gourd. Parsley shallot courgette tatsoi pea sprouts fava bean collard
greens dandelion okra wakame tomato. Dandelion cucumber earthnut pea peanut soko zucchini.
</p>
</div>
</body>
</html>
'CSS > MDN 문제 풀이' 카테고리의 다른 글
Test your skills: Writing modes and logical properties (0) | 2022.11.07 |
---|---|
Test your skills: Backgrounds and borders (0) | 2022.11.07 |
Test your skills: Selectors (0) | 2022.11.06 |
Test your skills: The Cascade (0) | 2022.11.04 |
Styling a biography page (0) | 2022.10.25 |