///実現したいこと
HTMLでサイト構築をしており、
footerの背景色を変更したいのですが、
background-colorの適応ができません。
よろしくお願い致します。
該当のソースコード
//HTML//////////////////
<!DOCTYPE html> <html> <head> <title>Official HP</title> <meta charset="utf-8"> <html lang="ja"> <link rel="stylesheet" type="text/css" href="samurai1.css"> <link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet"> </head> <body> <header> <a href="/" class="op" style="opacity: 1;"> <img src="画像/IMG_.jpg" width="30" height="30" alt=""> </a> </header> <main> <div class="parent"> <div class="child"> <img src="画像/IMG_.jpg" alt=""> <span> <font size="6" color="white"> A </font> </span> </div> <div class="child"> <img src="画像/IMG_0728.jpg"> <span> <font size="6" color="white"> B </font> </span> </div> </div> </main></body> </html><footer> <div class="footer-logo">C</div> <div class="footer-list"> <ul> <li>D</li> </ul> </footer>
//Styleseet///////////////
header {
background-color: #000000;
}
header img{
background-color: #000000;
float: left;
width: 120px;
height: auto;
}
main {
background-color: #000000;
}
footer{
background-color: #000000;!important
color: black;
}
.parent {
width: 100%;
display: flex;
max-width: 3000px; /* 最大幅 /
min-width: 240px; / 最小幅 */
}
.child img { width: 100%; }
.child{
position: relative;
}
.child span {
font-size: 6px;
color: #fff;
position: absolute;
top: 50%;
left: 50%;
-ms-transform: translate(-50%,-50%);
-webkit-transform: translate(-50%,-50%);
transform: translate(-50%,-50%);
margin:0;
padding:0;
text-align: center;
}
div{
display: block;
}
.footer-logo{
float: left;
}
li{
float: left;
list-style: none;
}
回答1件
あなたの回答
tips
プレビュー