我正在做一個小軟件,它有一個QWebView
來顯示HTML
文件。我的問題是我的歡迎頁面顯示不好。它看起來像,它應該在中間的那些紅線之間有一個圖像。這個問題肯定是我的HTML
和/或CSS. So here is my
HTML`:HTML頁面不會顯示在QWebview
<!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它的工作原理髮現有。它應該看起來像this
別人如果有人有另一種方式來製作一個這樣的網頁,我會嘗試它!我在HTML CSS中並不擅長,所以我很開放 – castors33 2012-07-20 13:18:35