css3PIE或PIE.htc在Asp.net [英] css3PIE or PIE.htc in Asp.net

查看:146
本文介绍了css3PIE或PIE.htc在Asp.net的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗯,我在这是行不通的asp.net使用css3pie。我想尽一切可能的解决方案。搜索了很多论坛,但未能在asp.net中正确使用PIE。让我告诉你我的项目结构。

Well I used css3pie in asp.net which is not working. I tried every possible solution. Searched a lot of forums but failed to properly use PIE in asp.net. Let me show you my project structure.

我有主在我的项目层次结构内的母版页。

该css3pie正在那些不使用母版页的页面。
我的CSS和.HTC文件如下

I have master and inner master pages in my project hierarchy.
The css3pie is working on those pages which don't use master pages. My css and .htc files are as follows




    • CSS

    • 剧本

    当我使用css3PIE没有母版页的工作原理:

    When I use css3PIE without Master page the it works:

    <script type="text/javascript" src="../Scripts/html5.js"></script>        
    
    <link href="css/IE.css" rel="stylesheet" type="text/css" />
    

    以上code正在工作。但是,当我使用的任何页面主人。这是行不通的。我的CSS看起来有些事情是这样的:

    The above code is working. But when i used any page with master. It is not working. My css looks some thing like this:

    behavior: url('../Scripts/PIE.htc');
    

    的CSS放在IE.css文件。你可以看到上面的code内找到。
    记住我试过所有可能的组合在CSS中引用.HTC

    The css is placed in IE.css file. You can see the in above code. Remember i tried every possible combination to refer .htc in css

    behavior: url('../Scripts/PIE.htc');
    
    behavior: url('/Scripts/PIE.htc');
    
    behavior: url('/PIE.htc');
    
    behavior: url('PIE.htc');
    
    with and without quotes
    

    还有一件事。很多人都在说这是由于相对路径。好吧,我测试过这些东西。当我看到在IE开发工具所提供的HTML。它applys的行为,但不工作。
    请帮帮我。这将是非常美联社preciated。在此先感谢

    One thing more. A lot of people are saying it is due to relative path. Well i tested those things. when i look at the rendered html in Development tools in IE. It applys the behavior but not working. Please help me. It will be highly appreciated. Thanks in advance

    推荐答案

    好吧,我固定的问题。所以,我写在这里帮助其他人。当你使用asp.net母版页和您使用的是宏达文件在CSS相对路径,然后使用位置相对的。为此使用CSS3风格的目标元素。例如CSS类是圆盒

    Ok I fixed the issue. So i am writing here to help other peoples. When you are using master pages in asp.net and you are using .htc file as relative path in css then use position as relative. for target element which used css3 style. For example the css class is round-box

    <style>
    .round-box
    {
      border: 1px solid #696;
      -webkit-border-radius: 8px;
      -moz-border-radius: 8px;
      border-radius: 8px;
      behavior: url(PIE.htc);
    }
    </style>
    

    上,我们将申请.round盒风格的HTML元素是

    The html element on which we will apply .round-box style is

    <div class="round-box">This is a round Div<div>
    

    所以,那些谁的问题不工作的IE浏览器圆角只是把IE浏览器的具体位置:相对的IE浏览器,如

    So those who have issue with round corners not working on IE just put IE specific position:relative for IE browsers like.

     <!--[if lt IE 9]>
        <style>        
            .round-box
            {
                position: relative;
            }       
        </style>
     <![endif]-->
    

    这将解决这个问题,圆或那些没有边框可见。请记住位置:相对会影响子元素。使用它明智地

    This will fix the round issue or those that have no border visible. Keep in mind position:relative will effect child elements. Use it wisely

    这篇关于css3PIE或PIE.htc在Asp.net的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆