質問編集履歴
1
追記
title
CHANGED
File without changes
|
body
CHANGED
@@ -40,4 +40,46 @@
|
|
40
40
|
```
|
41
41
|
### 試したこと
|
42
42
|
[こちらの記事](https://qiita.com/chocolamint/items/67d25933880404c93db0)
|
43
|
-
で書かれたことを実行したところ多少スクロールはできるようになりましたが、一番下まで(footerが見えるまで)スクロールできませんでした。
|
43
|
+
で書かれたことを実行したところ多少スクロールはできるようになりましたが、一番下まで(footerが見えるまで)スクロールできませんでした。
|
44
|
+
html
|
45
|
+
```
|
46
|
+
<body>
|
47
|
+
<div class="wrapper">
|
48
|
+
<div class="wrapper-inner">
|
49
|
+
<div class="container" style="max-width: 960px; margin: 0 auto;">
|
50
|
+
<%= yield %>
|
51
|
+
<footer>
|
52
|
+
<p style="text-align: center; color: white;">2021</p>
|
53
|
+
</footer>
|
54
|
+
</div>
|
55
|
+
</div>
|
56
|
+
</div>
|
57
|
+
</body>
|
58
|
+
```
|
59
|
+
css
|
60
|
+
```
|
61
|
+
@media screen and (max-width:480px){
|
62
|
+
.wrapper{
|
63
|
+
min-height: 100vh;
|
64
|
+
background: url("紫.jpg");
|
65
|
+
background-repeat: repeat-x;
|
66
|
+
background-size: 187px;
|
67
|
+
position: relative;
|
68
|
+
padding-bottom: 120px;
|
69
|
+
box-sizing: border-box;
|
70
|
+
}
|
71
|
+
footer{
|
72
|
+
background: url("紫.jpg");
|
73
|
+
position: absolute;
|
74
|
+
bottom: 0;
|
75
|
+
left: 0;
|
76
|
+
width: 100%;
|
77
|
+
}
|
78
|
+
.wrapper-inner{
|
79
|
+
min-height: 100vh;
|
80
|
+
overflow: auto;
|
81
|
+
-webkit-overflow-scrolling: touch;
|
82
|
+
}
|
83
|
+
}
|
84
|
+
|
85
|
+
```
|