gpt4 book ai didi

html - Modernizr 检查 CSS3 和 css 动画将不起作用

转载 作者:行者123 更新时间:2023-11-28 11:47:55 25 4
gpt4 key购买 nike

如果我的网站检测到不支持 CSS3,我将无法重定向我的网站。我使用 CSS3 动画,所以我决定对它们进行测试,但我无法让它重定向,更不用说在我的 .请帮帮我。谢谢!

    <!DOCTYPE html>
<html>
<head>
<title>95.3 FM - KXLE Stream</title>
<script type="text/javascript" src="modernizr.custom.86596.js"></script>
<link rel="icon" type="image/png" href="images/favicon.png">
<link rel="stylesheet" type="text/css" href="css/style.css">
<link href="css/ui-lightness/jquery-ui-1.10.3.custom.css" rel="stylesheet">
<script src="js/jquery-1.9.1.js"></script>
<script src="js/jquery-ui-1.10.3.custom.js"></script>
<script type="text/javascript" src="js/js.js"></script>
<script> //THIS IS WHAT WILL NOT WORK********************************************
if (!Modernizr.cssanimations) {
window.location.href = 'www.google.com';
}
</script>

</head>

最佳答案

你想用

   if (Modernizr.cssanimations) {
window.location.replace("http://google.com");
}

关于html - Modernizr 检查 CSS3 和 css 动画将不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20412276/

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