私はjavascript画像のスライドショーをコピーし、の中のsection
タグに配置しました。サイトをプレビューすると、スライドショーの一部が私の<footer>
の背後にあり、見ることができません。残りの画像スライドショーを見るためにスクロールすることはできません。私の写真のスライドショーは私のフッターと協力していません。スライドショーの一部がフッタの後ろにあり、スクロールしません
私はそれがスクロールバーやボディのサイズのものだとは思いますが、わかりません。
私はHTML/CSSの新機能で、コードが厄介で、一部が冗長であるか不要であるため、建設的な批評も歓迎します。ここで
は私のhtmlです:
<section>
<div class="container">
<img class="mySlides" src="https://i.imgur.com/cWNxWqs.jpg?1" style="width:100%">
<img class="mySlides" src="img_lights.jpg" style="width:100%">
<img class="mySlides" src="img_mountains.jpg" style="width:100%">
<img class="mySlides" src="img_forest.jpg" style="width:100%">
<button class="w3-button w3-black w3-display-left" onclick="plusDivs(-1)">❮</button>
<button class="w3-button w3-black w3-display-right" onclick="plusDivs(1)">❯</button>
</div>
<script>
var slideIndex = 1;
showDivs(slideIndex);
function plusDivs(n) {
showDivs(slideIndex += n);
}
function showDivs(n) {
var i;
var x = document.getElementsByClassName("mySlides");
if (n > x.length) {slideIndex = 1}
if (n < 1) {slideIndex = x.length}
for (i = 0; i < x.length; i++) {
x[i].style.display = "none";
}
x[slideIndex-1].style.display = "block";
}
</script>
</section>
</body>
<footer>
<div class="container" style="clear: both">
<ul>
<li style="list-style-type: none;">Contact Me</li>
<li style="list-style-type: none;">Connect with Me</li>
</ul>
</div>
</footer>
そして、私のCSS:
footer{
font: 15px/1.5 Times New Roman;
bottom:0;
width:100%;
padding:50px 0px;
background:#9360DB;
border-top:#6163d0 3px solid;
clear: both;
position: fixed;
}
footer ul{
margin: 0;
padding: 0;
}
footer li{
text-decoration: none;
float: left;
display: inline;
padding: 0 10px 10px 10px;
color: white;
}
section{
width: 100%;
margin-bottom: auto;
}