gpt4 book ai didi

css - Windows 7 中的 Chrome CSS 转换错误

转载 作者:太空宇宙 更新时间:2023-11-04 15:46:36 26 4
gpt4 key购买 nike

我正在尝试转换某个事件的图片..说点击。它在 linux 甚至 XP 的 chrome 中运行良好,但在 windows 7 或 8 中的 chrome 无法正常显示。

如果您在 windows 7 或 8 的 firefox 和 chrome 中打开下面的链接,您就会知道我的问题是什么。

http://blacksheepinc.in/temp.php

示例代码:

<html xmlns="http://www.w3.org/1999/xhtml">
<html>
<head>
<script type='text/javascript' src='jquery.js'></script>
<script type='text/javascript'>
function rtt() {
$('#logo').css('-webkit-transition', 'all 2s ease-in')
$('#logo').css('-moz-transition', 'all 2s ease-in')
$('#logo').css('-webkit-transform','rotate(270deg)');
$('#logo').css('-moz-transform','rotate(270deg)');
}
</script>
</head>
<body>
<pre>
Click on the pic
</pre>
<img id='logo' src='logo.png' onclick='rtt()' style='position:absolute;'/>
</body>
</html>

还有人遇到过吗?

感谢您的宝贵时间!!!

最佳答案

您是否尝试过使用更多 CSS 而更少使用 JS?与 jQuery 相比,我更相信 CSS 和我的动画。像这样:

<style type="text/css">

.logo {
-webkit-transition:all 2s ease-in;
-moz-transition: all 2s ease-in;
}
.logo.end {
-webkit-transform: rotate(270deg);
-moz-transform: rotate(270deg);
}

</style>
<script type='text/javascript'>

$('#logo').click(function() {
$(this).addClass('end');
});

</script>

关于css - Windows 7 中的 Chrome CSS 转换错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11693810/

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