発生している問題・エラーメッセージ
divpuzzleで背景色×画像を同時に反映させたいが画像のみ反映されない。 画像以外は問題なく反映されています。 --- エラーメッセージ-特になし ```ここに言語名を入力
HTML.CSS
<div class="header_left"> <img src="file:///Users/apple/Downloads/logo.png" alt=""> </div>
.header_left{
height: 120px;
width: 200px;
background: #add8e6 url('file:///Users/apple/Downloads/logo.png') no-repeat;
float: left;
ソースコード
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title></title> <link rel="stylesheet" href="style.css"> </head> <body> <div class="wrapper"> <div class="header"></body> </html><div class="header_left"> <img src="file:///Users/apple/Downloads/logo.png" alt=""> </div> <div class="header_right"> <div class="header_rightupper"></div> <div class="header_rightrower"></div> </div> </div> <div class="main"></div> <div class="footer">abc</div> </div>
.clearfix:after{
content: "";
display: block;
clear: both;
}
.wrapper{
margin: 0 auto;
}
.margin{
}
.header{
height:120px;
width:1000px;
margin: 10px;
}
.header_left{
height: 120px;
width: 200px;
background: #add8e6 url('file:///Users/apple/Downloads/logo.png') no-repeat;
float: left;
}
.header_right{
height: 120px;
width: 800px;
float: right;
}
.header_rightupper{
height: 60px;
width: 800px;
background-color: #87ceeb;
}
.header_rightrower{
height: 60px;
width: 800px;
background-color: #00ffff;
}
.main{
}
.footer{
height:50px;
width:1000px;
background-color:#00ced1;
margin: 10px;
}
試したこと
imgタグに画像urlを入れたりcssのbackgroundに画像urlを入れたりした
検索しました・
回答1件
あなたの回答
tips
プレビュー