質問編集履歴

1

HTML/cssを追記しました。

2021/01/19 01:30

投稿

shibaco
shibaco

スコア18

test CHANGED
File without changes
test CHANGED
@@ -24,6 +24,80 @@
24
24
 
25
25
 
26
26
 
27
+ ```HTML
28
+
29
+ <div class="view_box">
30
+
31
+ <span class="wpcf7-form-control-wrap upload-file">
32
+
33
+ <input type="file" name="upload-file" size="40" class="wpcf7-form-control wpcf7-file file-upload_input" id="myImage" accept=".gif,.png,.jpg,.jpeg" aria-invalid="false" /></span>
34
+
35
+ </div>
36
+
37
+ ```
38
+
39
+
40
+
41
+ ```scss
42
+
43
+ .file-upload_input {
44
+
45
+ outline: none;
46
+
47
+ margin-left: 18%;
48
+
49
+ &::before {
50
+
51
+ width: 180px;
52
+
53
+ height: 51px;
54
+
55
+ transition: all 0.3s;
56
+
57
+ background-image: -webkit-gradient(
58
+
59
+ linear,
60
+
61
+ left top,
62
+
63
+ right top,
64
+
65
+ from(#F7D441),
66
+
67
+ color-stop(50%, #BDA029),
68
+
69
+ to(#6A5910)
70
+
71
+ );
72
+
73
+ background-image: -webkit-linear-gradient(left, #F7D441, #BDA029 50%, #6A5910);
74
+
75
+ background-image: linear-gradient(90deg, #F7D441, #BDA029 50%, #6A5910);
76
+
77
+ border-radius: 4px;
78
+
79
+ content: 'ファイルを選択';
80
+
81
+ font-size: 14px;
82
+
83
+ left: 0;
84
+
85
+ position: absolute;
86
+
87
+ top: -12px;
88
+
89
+ line-height: 51px;
90
+
91
+ text-align: center;
92
+
93
+ }
94
+
95
+ }
96
+
97
+ ```
98
+
99
+
100
+
27
101
 
28
102
 
29
103
  試した動作