-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
266 lines (266 loc) · 8.06 KB
/
Copy pathindex.html
File metadata and controls
266 lines (266 loc) · 8.06 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>使いこなして効率アップ! ChromeのデベロッパーツールでCSSを検証する方法</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: sans-serif;
font-size: 16px;
color: #4d4f64;
}
h1 {
margin: 64px 0;
font-size: 24px;
font-weight: normal;
letter-spacing: 0.086em;
}
h2 {
padding-left: 16px;
position: relative;
height: 36px;
font-size: 20px;
line-height: 36px;
font-weight: normal;
letter-spacing: 0.064em;
margin-bottom: 32px;
}
h3 {
font-weight: normal;
}
h2:before {
display: inline-block;
content: "";
width: 4px;
height: 36px;
background-color: #fcc418;
position: absolute;
top: 0;
left: 0;
}
section {
padding: 48px 0px;
border-top: 1px solid #d4d4dc;
}
button {
width: 180px;
height: 60px;
letter-spacing: 0.06em;
font-size: 20px;
border: 2px solid #fcc418;
background-color: #fff;
color: #7e7e84;
cursor: pointer;
}
.container {
margin: 0 auto;
max-width: 840px;
padding: 24px;
}
.sectionInner {
display: flex;
flex-direction: column;
}
.sectionInner > * {
margin-bottom: 16px;
}
.description {
margin-top: 16px;
background-color: rgba(252, 196, 24, 0.3);
padding: 32px;
border-radius: 8px;
}
.description > li {
margin-bottom: 8px;
}
.description > li:last-child {
margin-bottom: 0px;
}
.changeStyle {
display: inline-block;
position: static;
top: 0;
left: 0;
padding: 16px 24px;
font-size: 18px;
background-color: #7e7e84;
color: #fff;
margin-tp: 12px;
}
.changeClassButton {
border-radius: 30px;
transition: background-color 0.3s;
}
.changeClassButton:hover {
background-color: #fcc418;
}
.changeClassButton.is-disabled {
border: 2px solid #7e7e84;
background-color: #7e7e84;
color: #fff;
opacity: 0.5;
}
.link {
height: 40px;
width: 160px;
display: flex;
align-items: center;
justify-content: space-between;
text-decoration: none;
color: #7e7e84;
font-size: 18px;
position: relative;
}
.link::after {
content: "";
background-image: url(./images/arrow_up_fill.svg);
width: 24px;
height: 24px;
background-size: 24px;
background-repeat: no-repeat;
}
.link.up::after {
width: 32px;
height: 32px;
background-size: 32px;
}
.link.up::before {
content: "";
width: 40px;
height: 40px;
position: absolute;
top: -2px;
right: -6px;
border: 2px solid #fcc418;
border-radius: 50%;
}
.link.right {
border-bottom: 2px solid #fcc418;
}
.link.right::after {
rotate: 45deg;
}
.shadowButton {
box-shadow: 8px 8px 0px 0px rgba(126, 126, 132, 0.5);
}
.flexbox, .grid {
max-width: 600px;
height: 200px;
border: 1px solid #7e7e84;
border-radius: 8px;
padding: 8px;
gap: 4px;
}
.flexbox {
display: flex;
flex-wrap: wrap;
}
.grid {
display: grid;
grid: repeat(2, 80px) / auto-flow 80px;
}
.flexbox_item, .grid_item {
border-radius: 8px;
background-color: #fcc418;
padding: 8px;
}
.flexbox_item {
width: 120px;
height: 60px;
}
</style>
</head>
<body>
<div class="container">
<h1>使いこなして効率アップ! ChromeのデベロッパーツールでCSSを検証する方法</h1>
<section>
<h2>スタイルを確認 / 変更する</h2>
<div class="sectionInner">
<span class="changeStyle">この要素のスタイルを確認 / 変更する</span>
<ul class="description">
<li>要素を右クリックして[検証]を選択するとデベロッパーツールが開きます。</li>
<li>[スタイル]タブでを要素にあたっているCSSが確認できます。</li>
<li>[計算済み]タブでは、最終的にその要素に適用されているCSSを確認することができます。</li>
<li>全称セレクタ「*」のpaddingや、bodyタグのfont-size、colorは上書きされて無効になったスタイルです。</li>
<li>プロパティ名が間違っている「margin-tp」の横にはwarningアイコンが表示されています。</li>
<li>「top」と「left」は「posotion: static;」とは一緒に使用できないのでinformationアイコンが表示されています。</li>
<li>warningアイコンとinformationアイコンの上にマウスを置くと問題のヒントが表示されます。</li>
<li>プロパティ横のチェックボックスをつけ外しすることで見た目が変化します。</li>
<li>paddingの横の三角をクリックするとショートハンドプロパティが展開されます。</li>
</ul>
</div>
</section>
<section>
<h2>クラスをつけたり外したりする</h2>
<div class="sectionInner">
<button class="changeClassButton">BUTTON</button>
<ul class="description">
<li>「:hov」ボタンをクリックし、「:hover」にチェックを入れるとホバー時のスタイルが確認できます。</li>
<li>「.is-disabled」クラスを付与するとボタンのスタイルが変わります。</li>
</ul>
</div>
</section>
<section>
<h2>要素の大きさ、角度を調整する</h2>
<div class="sectionInner">
<a href="#" class="link up">Back to Top</a>
<a href="#" class="link right">Some Link</a>
<ul class="description">
<li>shiftキーを押しながらドラッグすると10pxずつ値を増減できます。</li>
<li>angle clockで角度を簡単に変更できます。</li>
</ul>
</div>
</section>
<section>
<h2>影を調整する</h2>
<div class="sectionInner">
<button class="shadowButton">SHADOW</button>
<ul class="description">
<li>シャドウエディターで影の方向やぼかしの強さなどを調整できます。</li>
</ul>
</div>
</section>
<section>
<h2>文字の見た目を変更する</h2>
<div class="sectionInner">
<ul class="description">
<li>画面右側の歯車のマークをクリックし、「試験運用版」(英語の場合は「Experiments」)から「Enable new Font Editor tool within the Styles Pane.」にチェックを入れます。</li>
<li>右側の「AA」ボタンでフォントエディターを表示し文字を変更できます。</li>
</ul>
</div>
</section>
<section>
<h2>Flexbox、Gridのレイアウトを変更する</h2>
<div class="sectionInner">
<h3>Flexbox</h3>
<div class="flexbox">
<div class="flexbox_item">box1</div>
<div class="flexbox_item">box2</div>
<div class="flexbox_item">box3</div>
<div class="flexbox_item">box4</div>
<div class="flexbox_item">box5</div>
<div class="flexbox_item">box6</div>
</div>
<h3>Grid</h3>
<div class="grid">
<div class="grid_item">grid1</div>
<div class="grid_item">grid2</div>
<div class="grid_item">grid3</div>
<div class="grid_item">grid4</div>
<div class="grid_item">grid5</div>
<div class="grid_item">grid6</div>
</div>
<ul class="description">
<li>FrexboxやGridのレイアウトもクリックするだけで変更できます。</li>
</ul>
</div>
</section>
</div>
</body>
</html>