English 中文(简体)
CSS3PIE 访问被拒绝
原标题:CSS3PIE Access is denied

我在公司网站工作,主要是在启动 CSS 上。 我想删除许多创造圆角、阴影等的小图像。 CSS3 是一个完美的选择,但我们的用户仍然使用 IE7 和 IE8, 所以我也需要为它们准备这个网站。

我找到了很多关于 CSS3PIE 的好意见, 我下载过它并试图使用它, 但我的 IE8 不想合作 : 。 它说: 拒绝访问 PIE. htc 线 : 0 Char: 0 code: 0。 我试图将文件放在一个文件夹和不同的文件夹中, 在服务器和本地文件夹中检查这个信息... 我总是有相同的信息 。

HTML :

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns:og="http://opengraphprotocol.org/schema/">
<head>
<title>title</title>
<link rel="stylesheet" rev="template" type="text/css" href="styles.css">
</head>

<body id="home" class="cols_One">
<div id="wrapper" class="fauxBlock">
        <div id="header">
        <div id="cap">
        <div id="welcome"></div>
        <div id="quicklinks">abc</div>
        </div>
         </div>
    </div>
</body>
</html>

CSS :

#cap {
padding: 0 6px; 
font-size: 12px;
border-left: 1px solid #EEE;
border-right: 1px solid #EEE;
margin-bottom: 2px;
text-align: right;
line-height: 25px;
background: #fcfcfc; /*non-CSS3 browsers will use this*/
background: -webkit-gradient(linear, left top, left bottom, from(#f4f4f4) to(#fcfcfc)); /*old webkit*/
background: -webkit-linear-gradient(left top, left bottom, #f4f4f4, #fcfcfc); /*new webkit*/
background: -moz-linear-gradient(#f4f4f4, #fcfcfc); /*gecko*/
background: -ms-linear-gradient(#f4f4f4, #fcfcfc); /*IE10 preview*/
background: -o-linear-gradient(#f4f4f4, #fcfcfc); /*opera 11.10+*/
background: linear-gradient(#f4f4f4, #fcfcfc); /*future CSS3 browsers*/
-pie-background: ulinear-gradient(#f4f4f4, #fcfcfc); /*PIE*/
-moz-box-shadow: 0 2px 2px #d8d8d8;
-webkit-box-shadow: 0 2px 2px #d8d8d8;
box-shadow: 0 2px 2px #d8d8d8;
behavior:url(PIE.htc);

}

编辑:我添加了代码样本

问题回答

I ve solved this issue changing line endings of PIE.htc to Unix (not Windows). Tested on Windows7 + IE7 and IE8.

希望这能帮到你!

如果 css3pie 是作为本地文件运行, 而不是在网络服务器上运行, 您需要在 behavior: 属性中给出完整路径, 例如 :

behavior:url(C:/foo/PIE.htc);

I tried placing PIE.htc file at the root file or next to (ex: html file). And in css file used exactly same attribute like this .yourClass{behavior: url(PIE.htc);}. Actually relate your htc file to html page rather than css file. And it worked for me. :)





相关问题
Why doesn t "doScroll" work in IE8?

Is "doScroll" still supported by Microsoft in IE8? I can t get it to work at all. Here s a test page: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/...

IE8 focus pseudo class and Sibling Selector

I have some mark up and I am trying to have the "hints for some input" light up when the accosicated text input has focus. I am trying to use the focus pseudo class along with a sibling selector. If i ...

IE errors with jQuery & timeout

In a jquery hover event I use the following code to drop down a menu: clearTimeout(hTimeout); $( #lowermenu ).queue( fx , []); $( #menucenter .current ).removeClass( current ); $(this).children( a )....

IE8 Session sharing problem in ASP .Net Application

I am having ASP .Net application which is running perfectly in IE 7.0 but as due to session sharing in IE 8.0 (also in case of new window), application is giving unexpected behavior as session can be ...

ASP.NET - Issues with position of controls in IE8

recently I ve moved on to testing my web aplication in IE8, however, I ve noticed that the position of my controls now all over the place. This was not apparent when I was testing my app with IE7 and ...

Internet Explorer, How to change iframes src

For some reasons I m using an Iframe to display googlemaps, when I want to change it s content I m just changing the Iframe src using JQuery. $( #ggMap ).attr( src , http://newurl.com ); Apparently ...

IE8 Javascript doesnt run unless Developer Tools is open?

For some reason, in IE8, javascript is not running unless I reload the page with Developer Tools open. I close developer tools and reload the page and the javascript stops working. I m not getting any ...

热门标签