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

質問編集履歴

4

加筆

2019/12/24 15:06

投稿

settsuxan
settsuxan

スコア5

title CHANGED
File without changes
body CHANGED
@@ -426,4 +426,8 @@
426
426
  }
427
427
  ```
428
428
 
429
- を入れています。
429
+ を入れています。
430
+
431
+
432
+ 追記2:OSはwindows7、ブラウザはクロームで79.0.3945.88です。
433
+ ディスプレイは1920*1080です。

3

修正

2019/12/24 15:06

投稿

settsuxan
settsuxan

スコア5

title CHANGED
File without changes
body CHANGED
@@ -86,16 +86,7 @@
86
86
  // ]]></script>
87
87
  <div class="insentence-adsense">
88
88
  <p style="text-align:center;" >スポンサーリンク<br>
89
- <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
90
- <ins class="adsbygoogle"
91
- style="display:block; text-align:center;"
92
- data-ad-layout="in-article"
93
- data-ad-format="fluid"
94
- data-ad-client="ca-pub-2182608187039470"
95
- data-ad-slot="3928620735"></ins>
96
- <script>
89
+ 私のアドセンスコード
97
- (adsbygoogle = window.adsbygoogle || []).push({});
98
- </script>
99
90
  <p> </p>
100
91
  </div>
101
92
 
@@ -120,16 +111,7 @@
120
111
  // ]]></script>
121
112
  <div class="insentence-adsense2">
122
113
  <p style="text-align:center; font-size: 80%" >スポンサーリンク<br>
123
- <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
124
- <ins class="adsbygoogle"
125
- style="display:block; text-align:center;"
126
- data-ad-layout="in-article"
127
- data-ad-format="fluid"
128
- data-ad-client="ca-pub-2182608187039470"
129
- data-ad-slot="3928620735"></ins>
130
- <script>
114
+ 私のアドセンスコード
131
- (adsbygoogle = window.adsbygoogle || []).push({});
132
- </script>
133
115
  </p>
134
116
  </div>
135
117
 
@@ -139,19 +121,7 @@
139
121
  <script>adsFilter();</script>
140
122
  <div id="my-footer">
141
123
  <p style="text-align:center;" >スポンサーリンク<br>
142
-
143
- <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
144
- <ins class="adsbygoogle"
145
- style="display:block; text-align:center;"
146
- data-ad-layout="in-article"
147
- data-ad-format="fluid"
148
- data-ad-client="ca-pub-2182608187039470"
149
- data-ad-slot="3928620735"></ins>
150
- <script>
124
+ 私のアドセンスコード
151
- (adsbygoogle = window.adsbygoogle || []).push({});
152
- </script>
153
-
154
-
155
125
  </p>
156
126
  </div>
157
127
 
@@ -163,20 +133,7 @@
163
133
 
164
134
  <div id="my-footer">
165
135
  <p style="text-align:center;" >こんな記事もあります<br>
166
-
167
- <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
168
- <ins class="adsbygoogle"
169
- style="display:block"
170
- data-ad-format="autorelaxed"
171
- data-ad-client="ca-pub-2182608187039470"
172
- data-ad-slot="7435869211"
173
- data-matched-content-ui-type="image_card_stacked"
174
- data-matched-content-rows-num="3"
175
- data-matched-content-columns-num="3"
176
- ></ins>
177
- <script>
136
+ 私のアドセンスコード
178
- (adsbygoogle = window.adsbygoogle || []).push({});
179
- </script>
180
137
  </p>
181
138
  </div>
182
139
 

2

情報の追加

2019/12/24 12:03

投稿

settsuxan
settsuxan

スコア5

title CHANGED
File without changes
body CHANGED
@@ -48,4 +48,425 @@
48
48
 
49
49
  ### 補足情報
50
50
  はてなブログのデザインは、minimalismです。
51
- なにか助言ありましたらお願いします。
51
+ なにか助言ありましたらお願いします。
52
+
53
+ 追記:ありがとうございます。
54
+ スマホ、タブレットでは問題ありませんが、PC上だと上記の異常が出ます。
55
+
56
+ 以下、読み込んでいるCSSです。
57
+
58
+
59
+ 記事下欄に、
60
+ ```
61
+ <script>
62
+ /*
63
+ * AdSense Filter v1.0.0
64
+ * Date: 2014-12-10
65
+ * Copyright (c) 2014 http://hapilaki.hateblo.jp/
66
+ * Released under the MIT license:
67
+ * http://opensource.org/licenses/mit-license.php
68
+ */
69
+ noAdsTag="広告不要"; //広告を設置しないタグを指定
70
+ var pageTags=document.getElementsByTagName("meta");
71
+ function adsFilter(){
72
+ for(var i=0;i<pageTags.length;i++){
73
+ if( ("article:tag"==pageTags[i].getAttribute("property")) && (noAdsTag == pageTags[i].getAttribute("content") ) ){
74
+ document.write('<!--');
75
+ break;
76
+ }
77
+ }
78
+ }
79
+ adsFilter();
80
+ </script>
81
+ <script>// <![CDATA[
82
+ addEventListener("DOMContentLoaded", function() {
83
+ var $target = $('.entry-content > h3');
84
+ $target.eq(0).before($('.insentence-adsense'));
85
+ }, false);
86
+ // ]]></script>
87
+ <div class="insentence-adsense">
88
+ <p style="text-align:center;" >スポンサーリンク<br>
89
+ <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
90
+ <ins class="adsbygoogle"
91
+ style="display:block; text-align:center;"
92
+ data-ad-layout="in-article"
93
+ data-ad-format="fluid"
94
+ data-ad-client="ca-pub-2182608187039470"
95
+ data-ad-slot="3928620735"></ins>
96
+ <script>
97
+ (adsbygoogle = window.adsbygoogle || []).push({});
98
+ </script>
99
+ <p> </p>
100
+ </div>
101
+
102
+
103
+
104
+
105
+
106
+
107
+
108
+
109
+
110
+
111
+
112
+
113
+ <script>adsFilter();</script>
114
+
115
+ <script>// <![CDATA[
116
+ addEventListener("DOMContentLoaded", function() {
117
+ var $target = $('.entry-content > h3,h4,h5');
118
+ $target.eq(Math.floor($target.size() / 2)).before($('.insentence-adsense2'));
119
+ }, false);
120
+ // ]]></script>
121
+ <div class="insentence-adsense2">
122
+ <p style="text-align:center; font-size: 80%" >スポンサーリンク<br>
123
+ <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
124
+ <ins class="adsbygoogle"
125
+ style="display:block; text-align:center;"
126
+ data-ad-layout="in-article"
127
+ data-ad-format="fluid"
128
+ data-ad-client="ca-pub-2182608187039470"
129
+ data-ad-slot="3928620735"></ins>
130
+ <script>
131
+ (adsbygoogle = window.adsbygoogle || []).push({});
132
+ </script>
133
+ </p>
134
+ </div>
135
+
136
+
137
+
138
+
139
+ <script>adsFilter();</script>
140
+ <div id="my-footer">
141
+ <p style="text-align:center;" >スポンサーリンク<br>
142
+
143
+ <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
144
+ <ins class="adsbygoogle"
145
+ style="display:block; text-align:center;"
146
+ data-ad-layout="in-article"
147
+ data-ad-format="fluid"
148
+ data-ad-client="ca-pub-2182608187039470"
149
+ data-ad-slot="3928620735"></ins>
150
+ <script>
151
+ (adsbygoogle = window.adsbygoogle || []).push({});
152
+ </script>
153
+
154
+
155
+ </p>
156
+ </div>
157
+
158
+
159
+
160
+
161
+
162
+ <script>adsFilter();</script>
163
+
164
+ <div id="my-footer">
165
+ <p style="text-align:center;" >こんな記事もあります<br>
166
+
167
+ <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
168
+ <ins class="adsbygoogle"
169
+ style="display:block"
170
+ data-ad-format="autorelaxed"
171
+ data-ad-client="ca-pub-2182608187039470"
172
+ data-ad-slot="7435869211"
173
+ data-matched-content-ui-type="image_card_stacked"
174
+ data-matched-content-rows-num="3"
175
+ data-matched-content-columns-num="3"
176
+ ></ins>
177
+ <script>
178
+ (adsbygoogle = window.adsbygoogle || []).push({});
179
+ </script>
180
+ </p>
181
+ </div>
182
+
183
+
184
+
185
+
186
+ <div id="my-footer">
187
+ <iframe src="https://blog.hatena.ne.jp/settuxan/settsuxan.hatenablog.com/subscribe/iframe" allowtransparency="true" frameborder="0" scrolling="no" width="150" height="28"></iframe>
188
+ </div>
189
+ <script>
190
+ var myFooter=document.getElementById("my-footer");
191
+ var temp=myFooter.cloneNode(true);
192
+ myFooter.parentNode.removeChild(myFooter);
193
+ document.getElementsByClassName("entry-content")[0].appendChild(temp);
194
+ </script>
195
+ ```
196
+
197
+ CSS欄に、
198
+ ```
199
+ /* <system section="theme" selected="8599973812270629022"> */
200
+ @import url("https://blog.hatena.ne.jp/-/theme/8599973812270629022.css");
201
+ /* </system> */
202
+
203
+ /* <system section="background" selected="ebe9e3"> */
204
+ body{background:#ebe9e3;}
205
+ /* </system> */
206
+
207
+
208
+
209
+
210
+
211
+
212
+ .entry-content h3 {
213
+ padding: 4px 10px;
214
+ color: #111;
215
+ background-color: #f0f0f0;
216
+ border-left: 8px solid #2d70a4;
217
+ }
218
+
219
+
220
+
221
+
222
+ .entry-content h4 {
223
+ position: relative;
224
+ color: #fff;
225
+ padding: 8px 12px;
226
+ background-color: #129b98;
227
+ border-radius: 6px;
228
+ }
229
+ .entry-content h3::before{
230
+ position: absolute;
231
+ top: 100%;
232
+ left: 32px;
233
+ width: 0;
234
+ height: 0;
235
+ border-width: 10px;
236
+ border-style: solid;
237
+ border-color: transparent;
238
+ border-top-color: #129b98;
239
+ content: '';
240
+ }
241
+
242
+
243
+
244
+
245
+ .entry-content p {font-size: 16px;}
246
+
247
+
248
+ @media screen and (max-width: 480px){.entry-content p {font-size: 16px;}}
249
+
250
+
251
+
252
+
253
+
254
+
255
+ .box16{
256
+ padding: 0.5em 1em;
257
+ margin: 2em 0;
258
+ background: -webkit-repeating-linear-gradient(-45deg, #f0f8ff, #f0f8ff 3px,#e9f4ff 3px, #e9f4ff 7px);
259
+ background: repeating-linear-gradient(-45deg, #f0f8ff, #f0f8ff 3px,#e9f4ff 3px, #e9f4ff 7px);
260
+ }
261
+ .box16 p {
262
+ margin: 0;
263
+ padding: 0;
264
+ }
265
+
266
+
267
+
268
+
269
+ /* 文字の大きさ */
270
+ .entry-content {
271
+ font-size:17px;
272
+ line-height:1.7;
273
+ }
274
+
275
+
276
+
277
+
278
+
279
+ /*コピーライト*/
280
+ #copyright {
281
+ padding: 20px;
282
+ text-align: center;
283
+ background: #e6e6fa;/*背景色*/
284
+ font-size: 14px;
285
+ color:#000000 ;/*文字の色*/
286
+ }
287
+
288
+
289
+
290
+
291
+
292
+ /* もくじカスタマイズ */
293
+ .entry-content .table-of-contents{
294
+ background-color: #F5F5F5;/* 背景色 */
295
+ border: 1px solid #ccc; /* 線の太さ・種類・色 */
296
+ box-shadow:1px 1px 6px 0px #ccc;
297
+ -moz-box-shadow:1px 1px 6px 0px #ccc;
298
+ -webkit-box-shadow:1px 1px 6px 0px #ccc;
299
+ -o-box-shadow:1px 1px 6px 0px #ccc;
300
+ margin: 20px 5px; /* 外側の余白 上下・左右 */
301
+ padding: 20px 25px 15px 45px;
302
+ position: relative;
303
+ z-index: 0;
304
+ }
305
+ .entry-content .table-of-contents:after{
306
+ background-color: #66CCFF; /* マステ背景色 */
307
+ background-image: radial-gradient(#fff 20%, transparent 0), radial-gradient(#fff 20%, transparent 0); /* 水玉の色 */
308
+ background-position: 0 0, 8px 8px; /* 水玉の距離 */
309
+ background-size: 15px 15px; /* 水玉の大きさ */
310
+ border-left: 2px dotted rgba(0,0,0,0.1);
311
+ border-right: 2px dotted rgba(0,0,0,0.1);
312
+ box-shadow: 0 0 5px rgba(0,0,0,0.2);
313
+ content: 'もくじ';
314
+ display: block;
315
+ margin: 0 0 10px 0;
316
+ padding: 5px 20px;
317
+ color: #363947; /* マステ部分文字色 */
318
+ font-weight: bold;
319
+ text-align: center;
320
+ position: absolute;
321
+ top: -10px;
322
+ left: 20px;
323
+ transform: rotate(-3deg);
324
+ -moz-transform: rotate(-3deg);
325
+ -webkit-transform: rotate(-3deg);
326
+ -o-transform: rotate(-3deg);
327
+ }
328
+ .entry-content .table-of-contents li a {
329
+ text-decoration: none;
330
+ color:#555;/* 文字色 */
331
+ font-size:14px;
332
+ font-weight: bold;
333
+ }
334
+ .entry-content .table-of-contents li {
335
+ list-style-type: decimal;/* 番号振り */
336
+ margin-left: 0;
337
+ }
338
+ .entry-content .table-of-contents>li:first-child {
339
+ padding-top: 15px;
340
+ }
341
+ .entry-content .table-of-contents ul>li:last-child {
342
+ padding-bottom: 10px;
343
+ }
344
+
345
+
346
+ .entry-content p,
347
+ .entry-content div{
348
+ margin: 0;
349
+ }
350
+
351
+
352
+
353
+
354
+
355
+ .entry-content p,
356
+ .entry-content div{
357
+ margin-bottom: 10px;
358
+ }
359
+
360
+
361
+
362
+
363
+
364
+
365
+
366
+
367
+
368
+ /* 2016-05-05*/
369
+ <!-- メニューバー -->
370
+ #menubar{
371
+ width:100%;
372
+ }
373
+
374
+ #menubar ul{
375
+ display:table;
376
+ width:100%;
377
+ margin: 20;
378
+ padding: 0;
379
+ background-color: #FFFFFF; }
380
+ #menubar li{
381
+ display: table-cell;
382
+ width:20%;
383
+ padding:0;
384
+ background-color: #f7be16; }
385
+ #menubar li a{
386
+ display: block;
387
+ margin:0 auto;
388
+ padding:5px;
389
+ border: 1px solid #FFFFFF;
390
+ text-decoration: none;
391
+ color: #FFFFFF;
392
+ text-align: center;
393
+ font-size: 18px; }
394
+ #menubar li a:hover{
395
+ background-color: #ec9b3b; }
396
+
397
+
398
+
399
+
400
+ /*トップページコメント非表示*/
401
+ .page-index .comment-box {
402
+ display: none;
403
+ }
404
+
405
+
406
+
407
+
408
+ /*トップページはてなスター非表示*/
409
+ .page-index .hatena-star-add-button {
410
+ display: none;
411
+ }
412
+ .page-index .hatena-star-user {
413
+ display: none;
414
+ }
415
+ .page-index .hatena-star-star {
416
+ display: none;
417
+ }
418
+ .page-index .hatena-star-inner-count {
419
+ display: none;
420
+ }
421
+ .page-index .hatena-star-star-container {
422
+ display: none;
423
+ }
424
+
425
+
426
+
427
+
428
+
429
+
430
+
431
+ /* タイトル画像を横いっぱいにのばす */
432
+ #blog-title-inner{
433
+ overflow-x: hidden;
434
+ width: 100%; /* 幅100%に */
435
+ background-size: cover;
436
+ margin: 0 auto;
437
+ padding: 0;
438
+ top: 0;
439
+ }
440
+
441
+
442
+
443
+
444
+
445
+ /* タイトル画像とグローバルヘッダの間の余白を消す */
446
+ #blog-title{
447
+ height:135px;
448
+ }
449
+ /* ブログ説明文を上にずらす */
450
+ .header-image-enable #blog-description {
451
+ margin-top: -30px;
452
+ }
453
+ /*タブレット*/
454
+ @media screen and (max-width: 968px){
455
+ /* タイトル画像とグローバルヘッダの間の余白を消す */
456
+ #blog-title{
457
+ height:170px;
458
+ }
459
+ }
460
+
461
+
462
+
463
+
464
+ /* ヘッダー画像スマホ対応 */
465
+ @media screen and (max-width:480px) {
466
+ .header-image-enable #blog-title #blog-title-inner, .header-image-only #blog-title #blog-title-inner {
467
+ padding: 10px 0;
468
+ }
469
+ }
470
+ ```
471
+
472
+ を入れています。

1

タイトル

2019/12/24 11:57

投稿

settsuxan
settsuxan

スコア5

title CHANGED
@@ -1,1 +1,1 @@
1
- はてなブログのフォーマットが崩れた。
1
+ 特定記事で広告が非表示にるコードを入れたらブログのフォーマットが崩れた。解決法求む。
body CHANGED
File without changes