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>Task 1</title>
    <style>
        body {
            background-color: #fff;
            color: #333;
            font: 1.2em / 1.5 Helvetica Neue, Helvetica, Arial, sans-serif;
            padding: 1em;
            margin: 0;
        }

        .box {
            border: 5px solid rebeccapurple;
            background-color: lightgray;
            padding: 40px;
            margin: 40px;
            writing-mode: vertical-rl;
        }
    </style>
</head>
<body>
    <div class="box">Turn me on my side.</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>Task 2</title>
    <style>
        body {
            background-color: #fff;
            color: #333;
            font: 1.2em / 1.5 Helvetica Neue, Helvetica, Arial, sans-serif;
            padding: 1em;
            margin: 0;
        }
        
        .vertical {
            writing-mode: vertical-rl;
        }

        .box {
            border: 5px solid rebeccapurple;
            background-color: lightgray;
            padding: 40px;
            margin: 40px;
            inline-size: 200px;
            block-size: 100px;
        }
    </style>
</head>
<body>
    <div class="box">Horizontal.</div>
    <div class="box vertical">Vertical.</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>Task 3</title>
    <style>
        body {
            background-color: #fff;
            color: #333;
            font: 1.2em / 1.5 Helvetica Neue, Helvetica, Arial, sans-serif;
            padding: 1em;
            margin: 0;
        }

        .vertical {
            writing-mode: vertical-rl;
        }

        .box {
            width: 150px;
            height: 150px;
            border-block-start: 5px solid rebeccapurple;
            border-inline-end: 5px solid grey;
            border-block-end: 5px dotted red;
            border-inline-start: 5px dotted blue;
            padding-block-start: 40px;
            margin-block-end: 30px;
        }
    </style>
</head>
<body>
    <div class="box">Horizontal.</div>
    <div class="box vertical">Vertical.</div>
</body>
</html>

 

도움 받은 곳

https://github.com/mdn/css-examples/blob/main/learn/tasks/writing-modes/marking.md

 

 

 

 

 

'CSS > MDN 문제 풀이' 카테고리의 다른 글

Test your skills: Values and units  (0) 2022.11.08
Test your skills: Overflow  (0) 2022.11.07
Test your skills: Backgrounds and borders  (0) 2022.11.07
Test your skills: The box model  (0) 2022.11.06
Test your skills: Selectors  (0) 2022.11.06

+ Recent posts