Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions docs/1-trial-session/03-css/_samples/foo/index.html

This file was deleted.

44 changes: 0 additions & 44 deletions docs/1-trial-session/03-css/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -142,47 +142,3 @@ HTMLファイルとCSSファイルを分けて作成する場合、`style`属性
2. `.bar button`

</Answer>

## 演習問題3(発展)

画像のようなシンプルなボックスを作ってみましょう。

![シンプルなボックス](./rounded-box-with-shadow.png)

シンプルで、よく見かけるデザインですが、様々な指定が必要であることが分かります。次のような点に注意してデザインしてみてください。

- グレーの枠線が付いています (border)
- 枠線は角丸になっています (border-radius)
- 枠線の外側に余白があります (margin)
- 枠線の内側にも余白があります (padding)
- ボックスに影がついています (box-shadow)

<Answer title="シンプルなボックス">

```html title="index.html"
<!doctype html>
<html lang="ja">
<head>
<meta charset="utf-8" />
<link rel="stylesheet" href="./style.css" />
<title>Title</title>
</head>
<body>
<div id="foo">Foo</div>
</body>
</html>
```

```css title="style.css"
#foo {
border: 1px solid #aaa;
border-radius: 10px;
margin: 30px;
padding: 30px;
box-shadow: 0px 0px 2px 1px #aaa;
}
```

<ViewSource url={import.meta.url} path="_samples/foo" />

</Answer>
Binary file not shown.