gpt4 book ai didi

css - rgba 在 IE9 中不工作

转载 作者:技术小花猫 更新时间:2023-10-29 11:06:39 24 4
gpt4 key购买 nike

出于某种原因,我无法使用 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>

我的 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;
}

最佳答案

Internet Explorer 9 中的新标准支持要求浏览器处于 Internet Explorer 9 标准模式(“IE9 模式”)。最好的方法是使用标准的 !DOCTYPE 指令,而不使用 X-UA-Compatible 元标记或 HTTP header 。调用 IE9 模式的 !DOCTYPE 如下:

<!DOCTYPE html>

background-color: rgba(0,0,0,0.5);

关于css - rgba 在 IE9 中不工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6515551/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com