2017-08-15 98 views
0

我連着page.css(以下內容)和.gif文件到我的幫助項目的[文件]節,並添加這一行到一些HTML文件:HTML Help Workshop中:CSS梯度消失

<body class="grade"> 
<link rel="stylesheet" href="page.css" type="text/css" /> 

一切工作正常,chm文件顯示一個不錯的漸變。

當我切換到幫助內的非漸變頁面然後切換回漸變站點時,發生了一件奇怪的事情:漸變已消失,但其他css屬性仍然存在。

有沒有人有想法?

這裏我page.css:

body{font-family:Arial, sans-serif;} 

#grad { 
    background: red; /* For browsers that do not support gradients */ 
    background: -webkit-linear-gradient(left, red , yellow); /* For Safari 5.1 to 6.0 */ 
    background: -o-linear-gradient(right, red, yellow); /* For Opera 11.1 to 12.0 */ 
    background: -moz-linear-gradient(right, red, yellow); /* For Firefox 3.6 to 15 */ 
    background: linear-gradient(to right, red , yellow); /* Standard syntax */ 
} 

a {text-decoration:none; border:none; outline:none;} 
a:hover{color:#FF3F00; text-decoration:none; border:none; outline:none;} 
a:visited {text-decoration:none; border:none; color:#FF3F00; outline:none;} 
a:visited:hover{color:#0000FF; text-decoration:none; border:none; outline:none;} 

h1{font-size:15pt; margin-top:20px;} 

h2{font-size:13pt;margin-left:20px; margin-bottom:0px; padding:0px;} 

h3{font-size:11pt; margin-left:40px; margin-bottom:0px; margin-top:0px; padding:0px;} 


p.text{font-size:11pt; color:#000; margin-left:40px; margin-bottom:0px; margin-top:0px; padding:0px;} 
/*p.textimg{font-size:10pt; color:#000; margin-left:100px; margin-top:0px;}*/ 

div#page{width:95%; margin:auto;} 

.grade {background-image:url(images/blue3.gif); background-repeat: repeat-y;} 

ul {list-style:disc;} 
li {font-size:11pt;} 
br {clear:left} 

回答

0

添加以下語句,所有的HTML文件的部分。如果將HTML主題文件封裝在.chm幫助文件中,這將起作用。

<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE11"/> 

例如爲:

<!DOCTYPE html> 

<html> 
<head> 
    <title>Gradient used</title> 
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE11"> 
    <link rel="stylesheet" href="page.css" type="text/css"> 
</head> 

<body id="grad"> 

    <p>This is a test.</p> 

    <p>And a second line.</p> 

</body> 
</html> 

enter image description here