質問編集履歴

2

修正

2021/07/13 05:07

投稿

pepe1122
pepe1122

スコア14

test CHANGED
File without changes
test CHANGED
@@ -44,16 +44,106 @@
44
44
 
45
45
  ```js
46
46
 
47
- <script>
47
+ $(function(){
48
48
 
49
- $('.end-btn').on('click', function(){
49
+ $('.end-btn').on('click', function(){
50
50
 
51
- $('.float-content').fadeOut(300);
51
+ $('.float-content').fadeOut(300);
52
52
 
53
- });
53
+ });
54
54
 
55
+
56
+
57
+ var clickEventType = (( window.ontouchstart!==null ) ? 'click':'touchend');
58
+
59
+ $(document).on(clickEventType,'.end-btn',function(){
60
+
55
- </script>
61
+ $('.float-news').fadeOut(300);
62
+
63
+ });
64
+
65
+ });
56
66
 
57
67
 
58
68
 
59
69
  ```
70
+
71
+
72
+
73
+ ```css
74
+
75
+ .close img {
76
+
77
+ width: 100%;
78
+
79
+ }
80
+
81
+ .end-btn {
82
+
83
+ width: 100%;
84
+
85
+ height: 100%;
86
+
87
+ z-index: 2;
88
+
89
+ cursor: pointer;
90
+
91
+ }
92
+
93
+
94
+
95
+ .close {
96
+
97
+ position: absolute;
98
+
99
+ top: 0;
100
+
101
+ right: 0;
102
+
103
+ width: 36px;
104
+
105
+ height: 36px;
106
+
107
+ cursor: pointer !important;
108
+
109
+ }
110
+
111
+
112
+
113
+ .float-box{
114
+
115
+ position: fixed;
116
+
117
+ display: flex;
118
+
119
+ align-items: center;
120
+
121
+ border-width: 2px;
122
+
123
+ border-style: solid;
124
+
125
+ border-color: #bbbbbb;
126
+
127
+ border-radius: 10px;
128
+
129
+ background-color: #ffffff;
130
+
131
+ bottom: 30px;
132
+
133
+ left: 30px;
134
+
135
+ width: auto;
136
+
137
+ max-width: 480px;
138
+
139
+ min-width: 240px;
140
+
141
+ z-index: 2;
142
+
143
+ }
144
+
145
+
146
+
147
+
148
+
149
+ ```

1

修正

2021/07/13 05:06

投稿

pepe1122
pepe1122

スコア14

test CHANGED
File without changes
test CHANGED
@@ -28,7 +28,7 @@
28
28
 
29
29
  <div class="close">
30
30
 
31
- <a href="javascript:void(0)" class="end-btn" style="cursor: pointer;">
31
+ <a href="javascript:void(0)" class="end-btn" style="cursor: pointer;">
32
32
 
33
33
  <img src="/img/close.png">
34
34