-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflex-tags.html
More file actions
68 lines (63 loc) · 1.59 KB
/
Copy pathflex-tags.html
File metadata and controls
68 lines (63 loc) · 1.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Demo</title>
<link rel="stylesheet" href="style.css">
<style>
.resizable {
resize: horizontal;
overflow: hidden;
max-width: 100%;
width: 420px;
padding: 24px;
border: 1px dashed #aaa;
margin-bottom: 24px;
}
.tags {
display: flex;
flex-wrap: wrap;
gap: .5rem 1.5rem;
margin: 0;
padding: 0;
list-style: none;
}
/* borderで区切る場合 */
.tags-border li:not(:first-child) {
border-left: 1px solid #c00;
padding-left: .75rem;
margin-left: -.75rem;
}
/* column-ruleで区切る場合 */
.tags-rule {
column-rule: 1px solid #c00;
}
</style>
</head>
<body class="needs-gap-decorations">
<p class="note">枠の右下をドラッグすると幅を変えられます。折り返しの位置を変えて見比べてください。</p>
<h2>borderで区切った場合</h2>
<div class="resizable">
<ul class="tags tags-border">
<li>CSS</li>
<li>HTML</li>
<li>JavaScript</li>
<li>アクセシビリティ</li>
<li>パフォーマンス</li>
<li>デザイン</li>
</ul>
</div>
<h2>column-ruleで区切った場合</h2>
<div class="resizable">
<ul class="tags tags-rule">
<li>CSS</li>
<li>HTML</li>
<li>JavaScript</li>
<li>アクセシビリティ</li>
<li>パフォーマンス</li>
<li>デザイン</li>
</ul>
</div>
</body>
</html>