質問するログイン新規登録

質問編集履歴

1

CSSを追記

2016/12/13 13:31

投稿

TheDiamondFour
TheDiamondFour

スコア11

title CHANGED
File without changes
body CHANGED
@@ -23,6 +23,9 @@
23
23
  このように表示させるにはどのようなスタイルを書けばよいのでしょうか?
24
24
  ご教授願います。
25
25
 
26
+ CSSを追記させていただきました。
27
+ ご指摘ありがとうございます。
28
+
26
29
  ###発生している問題・エラーメッセージ
27
30
 
28
31
  ```
@@ -33,12 +36,34 @@
33
36
  ```html
34
37
  <div class="list-sec">
35
38
  <ol class="list">
36
- <li class="list-item">テキストテキスト</li>
39
+ <li>テキストテキスト</li>
37
- <li class="list-item">テキストテキスト</li>
40
+ <li>テキストテキスト</li>
38
- <li class="list-item">テキストテキストテキストテキスト</li>
41
+ <li>テキストテキストテキストテキスト</li>
39
42
  </ol>
40
43
  </div>
41
44
  ```
45
+ ```css
46
+ .list {
47
+ list-style: none;
48
+ counter-reset: number;
49
+ padding: 0;
50
+ font-size: 15px;
51
+ }
52
+ .list li {
53
+ line-height: 2;
54
+ }
55
+ .list li:before {
56
+ counter-increment: number;
57
+ content: counter(number);
58
+ display: inline-block;
59
+ width: 2em;
60
+ height: 2em;
61
+ text-align: center;
62
+ border: 2px solid #1b1464;
63
+ color: #1b1464;
64
+ margin-right: 1.4em;
65
+ }
66
+ ```
42
67
 
43
68
  ###試したこと
44
69
  課題に対してアプローチしたことを記載してください