我正在做一个有QWebView
显示HTML
文件的小软件。我的问题是我的欢迎页面显示不好。看起来应该在中间的那些红线之间有一个图像。问题肯定是我的
HTML
和/或CSS. So here is my
HTML`:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Untitled Document</title>
<link href="styles/accueil.css" rel="stylesheet" type="text/css" media="screen" />
</head>
<body>
<div class="container">
<div class="ligne"> </div>
</div>
<div class="ligne"> </div>
</body>
</html>
我的CSS
:
@charset "UTF-8";
/* CSS Document */
body{
background-color:white;
margin:0 auto;
height:100%;
}
html {
overflow-y: scroll;
height:100%;
}
img{
border:none;
}
.container {
min-height: 100%;
height: auto !important;
height: 100%;
margin: 0 auto -20px;
background-image: url(../icones/accueil.jpg);
background-repeat:no-repeat;
background-position:center center;
}
.ligne{
width:100%;
height: 20px;
background-color:#ee1b2e;
}
知道我写错了什么吗?
谢谢!
- - - 编辑 - - -
只有在 XP 上才会发生……在 MAC、7 和 Vista 上,它可以找到。它应该看起来像这样