간단한 배경 이미지로로드하려고하는데,로드하려고 애쓰는 것이 힘듭니다. 누구나 내가 뭘 잘못하고 있는지 볼 수 있습니까?배경 이미지가 작동하지 않을 수 있습니다.
HTML
<!DOCTYPE html>
<html>
<head>
<title>TEST</title>
<link rel="stylesheet" type="text/css" href="css/style.css">
<link rel="stylesheet" type="text/css" href="css/normalize.css">
</head>
<body>
<h1>Hello World</h1>
</body>
</html>
CSS
html {
background: url(images/bg.png) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
는 CSS에서 위에 언급 한 바와 같이 배경 이미지 이미지/bg.png의 디렉토리에 있습니다.
입니까? 그렇지 않으면 youl은'url ('../ images/bg.png')'또는 CSS 폴더의 상대 참조가 무엇이든간에해야하기 때문입니다. – PlantTheIdea
이것은 정확히 문제가되었습니다! 고맙습니다! – user2810581
나에게 잘 어울린다. http://jsfiddle.net/DFS7c/1/ – Liam