質問編集履歴

1

出力されているHTMLとCSSを追記いたしました。

2020/11/11 06:32

投稿

Fukusuke0604
Fukusuke0604

スコア552

test CHANGED
File without changes
test CHANGED
@@ -31,3 +31,87 @@
31
31
 
32
32
 
33
33
  <?php the_category(','); //カテゴリーを表示?> をデザインするにはどのようにすればいいのでしょうか?
34
+
35
+
36
+
37
+ google chrhome デベロッパーツールではHTML CSS は以下のように表示されています。
38
+
39
+
40
+
41
+ ```HTML
42
+
43
+ <div class="blog__category blog__article--category">
44
+
45
+ <a href="http://localhost:10009/category/category-1/" rel="category tag">カテゴリー1</a>
46
+
47
+ </div>
48
+
49
+ ```
50
+
51
+
52
+
53
+ ```CSS
54
+
55
+ CSS
56
+
57
+ .blog__article--category {
58
+
59
+ position: static;
60
+
61
+ width: 110px;
62
+
63
+ height: 31px;
64
+
65
+ display: -webkit-box;
66
+
67
+ display: -ms-flexbox;
68
+
69
+ display: flex;
70
+
71
+ -webkit-box-pack: center;
72
+
73
+ -ms-flex-pack: center;
74
+
75
+ justify-content: center;
76
+
77
+ -webkit-box-align: center;
78
+
79
+ -ms-flex-align: center;
80
+
81
+ align-items: center;
82
+
83
+ margin-bottom: 20px;
84
+
85
+ }
86
+
87
+
88
+
89
+ .blog__category {
90
+
91
+ position: absolute;
92
+
93
+ top: 0;
94
+
95
+ color: #fff;
96
+
97
+ background-color: var(--basecolor);
98
+
99
+ font-size: 1.2rem;
100
+
101
+ padding: 1px 5px;
102
+
103
+ border: 1px solid #707070;
104
+
105
+ }
106
+
107
+
108
+
109
+ a{
110
+
111
+ text-decoration: none;
112
+
113
+ transition: all .6s ease;
114
+
115
+ }
116
+
117
+ ```