rgba不在IE9中工作

cva*_*dal 7 css css3

出于某种原因,我无法使用IE9在我的CSS中使用rgba.我已经使用Chrome测试了它,它运行正常.不确定是什么问题.

我的HTML是:

<!doctype html>

<html lang="en">
    <head>
        <meta charset="utf-8" />

        <title><?php bloginfo('name'); ?> - <?php bloginfo('description'); ?></title>

        <link href="<?php bloginfo('stylesheet_url'); ?>" rel="stylesheet" type="text/css" />
        <link href="http://fonts.googleapis.com/css?family=Raleway:100&v1" rel="stylesheet" type="text/css" />

        <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script>
    </head>
    <body>
        <?php wp_nav_menu(); ?>
    </body>
</html>
Run Code Online (Sandbox Code Playgroud)

我的CSS是:

body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td{margin:0;padding:0;}table{border-collapse:collapse;border-spacing:0;}fieldset,img{border:0;}address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}li{list-style:none;}caption,th{text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;}q:before,q:after{content:'';}abbr,acronym{border:0;font-variant:normal;}sup{vertical-align:text-top;}sub{vertical-align:text-bottom;}input,textarea,select{font-family:inherit;font-size:inherit;font-weight:inherit;}input,textarea,select{*font-size:100%;}legend{color:#000;}

body {
    font-size: 62.5%;
}

.menu {
    font-size: 5em;
    font-family: 'Raleway', arial, serif;
}

.menu ul li a {
    background: rgba(0,0,0,0.5);
    text-decoration: none;
}
Run Code Online (Sandbox Code Playgroud)

vic*_*clm 13

Internet Explorer 9中的新标准支持要求浏览器处于Internet Explorer 9标准模式("IE9模式").执行此操作的最佳方法是使用标准!DOCTYPE指令,不使用X-UA兼容的元标记或HTTP标头.调用IE9模式的!DOCTYPE如下:

<!DOCTYPE html>

background-color: rgba(0,0,0,0.5);
Run Code Online (Sandbox Code Playgroud)


cva*_*dal 3

嗯,我知道为什么了。似乎“兼容性视图”已启用,所以我禁用了它,瞧。我可能是在想点击刷新按钮时不小心点击了它。