IE 8 (Win XP) 奇怪的崩溃 - Jquery 和 CSS “凡人”组合?

发布于 2025-01-06 21:38:13 字数 2550 浏览 0 评论 0原文

我们在 WinXP 机器上遇到了 IE 8 的一个非常奇怪的行为。

如果我们在 css 上设置背景图像并在标头中设置一些 jQuery 内容后加载 css,我们的浏览器就会崩溃。

在网上阅读了一些内容后,我们注意到,如果您在包含具有背景图像的 css 之前加载 jQuery(当然,该图像位于当前目录的文件系统中!),这种(或发布)的 MS 浏览器会崩溃。

是不是很奇怪?

有人可以告诉我们为什么吗?

编辑:

这是 .css 代码:

body { background: #650303 url('../images/bg_body.jpg') repeat-x top; }

这是包含内容:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4  /strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $lang; ?>" lang="<?php echo $lang; ?>" >
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="robots" content="index, follow" />
<meta name="keywords" content="Florence Hotel Orto de' Medici, florence hotels italy, hotels florence, hotels in florence, hotel florence, hotel in florence, florence hotel, florence, firenze, alberghi firenze, hotel firenze, hotel florenz, hotel florence, florence, florenz, hoteles florencia, accommodation florence, florence accommodation, accommodation in florence, lodging florence, florence accomodation,ponte vecchio, ponte vecchio hotel,duomo hotel, uffizi hotel, bed and breakfast, bed &amp; breakfast" />
<meta name="description" content="Florence Hotel Orto de' Medici: The central position of the Hotel, its well appointed banqueting suits, make it ideal for private functions such as business meetings, wedding receptions and cocktails parties." />
<title>Florence Hotel Orto de' Medici - <?php echo $titles["booking"][$_GET["lang"]]; ?></title>

<link href="favicon.ico" rel="shortcut icon" type="image/x-icon" />
<link rel="stylesheet" href="modules/mod_jweather/tmpl/mod_jweather.css" type="text/css" />
<link rel="stylesheet" href="modules/mod_jflanguageselection/tmpl/mod_jflanguageselection.css" type="text/css" />
<link rel="stylesheet" href="templates/brown2011/css/template.css" type="text/css" />

<?php require_once($PHP_LIBS_FOLDER."/common_libs/u3_head.php"); ?>
<!--[if lt IE 7]>
<script type="text/javascript" src="templates/brown2011/js/unitpngfix.js"></script>
<![endif]-->
<!--[if IE ]>
<link rel="stylesheet" href="templates/brown2011/css/IEtemplate.css" type="text/css" />
<![endif]-->

</head>

问题出在该链接中

<link rel="stylesheet" href="templates/brown2011/css/template.css" type="text/css" />

We face a very strange behaviour of I.E. 8 on a WinXP macchine.

If we set a background image onto a css and load css after setting in the header some jQuery stuff, our browser crash.

After reading some stuff onto internet, we notice that if you load jQuery before including a css that has a background image (and the image is in the filesystem at the current directory, of course!) this kind (or release) of M.S. Browser crashes.

Isn't it weird?

Someone can tell us why?

Edit:

This is .css code:

body { background: #650303 url('../images/bg_body.jpg') repeat-x top; }

This is the inclusion:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4  /strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $lang; ?>" lang="<?php echo $lang; ?>" >
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="robots" content="index, follow" />
<meta name="keywords" content="Florence Hotel Orto de' Medici, florence hotels italy, hotels florence, hotels in florence, hotel florence, hotel in florence, florence hotel, florence, firenze, alberghi firenze, hotel firenze, hotel florenz, hotel florence, florence, florenz, hoteles florencia, accommodation florence, florence accommodation, accommodation in florence, lodging florence, florence accomodation,ponte vecchio, ponte vecchio hotel,duomo hotel, uffizi hotel, bed and breakfast, bed & breakfast" />
<meta name="description" content="Florence Hotel Orto de' Medici: The central position of the Hotel, its well appointed banqueting suits, make it ideal for private functions such as business meetings, wedding receptions and cocktails parties." />
<title>Florence Hotel Orto de' Medici - <?php echo $titles["booking"][$_GET["lang"]]; ?></title>

<link href="favicon.ico" rel="shortcut icon" type="image/x-icon" />
<link rel="stylesheet" href="modules/mod_jweather/tmpl/mod_jweather.css" type="text/css" />
<link rel="stylesheet" href="modules/mod_jflanguageselection/tmpl/mod_jflanguageselection.css" type="text/css" />
<link rel="stylesheet" href="templates/brown2011/css/template.css" type="text/css" />

<?php require_once($PHP_LIBS_FOLDER."/common_libs/u3_head.php"); ?>
<!--[if lt IE 7]>
<script type="text/javascript" src="templates/brown2011/js/unitpngfix.js"></script>
<![endif]-->
<!--[if IE ]>
<link rel="stylesheet" href="templates/brown2011/css/IEtemplate.css" type="text/css" />
<![endif]-->

</head>

The problem are in that link

<link rel="stylesheet" href="templates/brown2011/css/template.css" type="text/css" />

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文