質問編集履歴

1

CSS追加

2021/01/12 10:01

投稿

pecchan
pecchan

スコア555

test CHANGED
File without changes
test CHANGED
@@ -12,7 +12,13 @@
12
12
 
13
13
 
14
14
 
15
+ <form method="get" action="#" class="search_container">
16
+
17
+ <input type="text" placeholder="何かお探しですか?">
18
+
15
- <input type="submit" value="&#xf002">
19
+ <input type="submit" value="&#xf002" >
20
+
21
+ </form>
16
22
 
17
23
 
18
24
 
@@ -28,7 +34,13 @@
28
34
 
29
35
  <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.3/css/all.css">
30
36
 
37
+ <form method="get" action="#" class="search_container">
38
+
39
+ <input type="text" placeholder="何かお探しですか?">
40
+
31
- <input type="submit" value="&#xf002">
41
+ <input type="submit" value="&#xf002" >
42
+
43
+ </form>
32
44
 
33
45
 
34
46
 
@@ -53,3 +65,117 @@
53
65
 
54
66
 
55
67
  分かる方教えて下さい。
68
+
69
+
70
+
71
+
72
+
73
+ ###CSS追加
74
+
75
+ ご質問のおかげでfont-family:がバージョン4の指定だったと分かりました。
76
+
77
+ バージョン5の指定に変えてみました。
78
+
79
+ ```css
80
+
81
+ .search_container{
82
+
83
+ position: relative;
84
+
85
+ box-sizing: border-box;
86
+
87
+ border: 2px solid #ddd;
88
+
89
+ display: block;
90
+
91
+ /* margin: 3px 10px; */
92
+
93
+ border-radius: 3px;
94
+
95
+ height: 2.3em;
96
+
97
+ /* width: 265px; */
98
+
99
+ width: 100%;
100
+
101
+ /* overflow: hidden; */
102
+
103
+ background-color: #fff;
104
+
105
+ input[type="text"]{
106
+
107
+ width: 100%;
108
+
109
+ border: none;
110
+
111
+ height: 2.0em;
112
+
113
+ padding-left: 10px;
114
+
115
+ &:focus {
116
+
117
+ box-shadow: 0 0 12px 0 rgba(255,153,0,1);
118
+
119
+ border: 2px solid #FFF !important;
120
+
121
+ outline: 0;
122
+
123
+ }
124
+
125
+ }
126
+
127
+ input[type="submit"]{
128
+
129
+
130
+
131
+ cursor: pointer;
132
+
133
+ font-family: 'Font Awesome 5 Free'; /*バージョン4はFontAwesome;*/
134
+
135
+ border: none;
136
+
137
+ background: $mainColor2;
138
+
139
+ color: #fff;
140
+
141
+ position: absolute;
142
+
143
+ width: 3.5em;
144
+
145
+ height: 2.05em;
146
+
147
+ /* width: 50px; */
148
+
149
+ /* height: 41px; */
150
+
151
+ right: 0px;
152
+
153
+ top: 0;
154
+
155
+ outline : none;
156
+
157
+ text-align: center;
158
+
159
+ }
160
+
161
+ }
162
+
163
+
164
+
165
+
166
+
167
+
168
+
169
+
170
+
171
+ ```
172
+
173
+
174
+
175
+ ですが一色になってしまいました。
176
+
177
+ ![イメージ説明](41fab349a66bcc43c16a29871a512407.jpeg)
178
+
179
+
180
+
181
+ もう少し調べてみます。