热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

这个CSS不应该在IE9中工作吗?-Shouldn'tthisCSSworkinIE9?

IhaveadivthatImrotatingasitfadesin.Itworksineverymodernbrowser,butthecodeforIE

I have a div that I'm rotating as it fades in. It works in every modern browser, but the code for IE doesn't seem to be working.

我有一个我正在旋转的div。它可以在每个现代浏览器中运行,但IE的代码似乎不起作用。

#box
{
    width: 400px;
    height: 400px;
    display: inline-block;
    position: absolute;
    transform: rotate(0deg);
    -webkit-transform: rotate(0deg);
    -moz-transform: rotate(0deg);
    -o-transform: rotate(0deg);
    -ms-transform: rotate(0deg);
    transition: all 0.8s 1s ease-in-out;
    -webkit-transition: all 0.8s 1s ease-in-out;
    -moz-transition: all 0.8s 1s ease-in-out;
    -o-transition: all 0.8s 1s ease-in-out;
    opacity:0;
}

#box.animate
{
    transform: rotate(360deg);
    -webkit-transform: rotate(360deg);
    -moz-transform: rotate(360deg);
    -o-transform: rotate(360deg);
    -ms-transform: rotate(360deg);
    opacity:100;
}

I've looked at the following two similar questions, but their solutions didn't solve my problem.

我看了下面两个类似的问题,但他们的解决方案并没有解决我的问题。

css3 rotation doesn't work in IE9

css3旋转在IE9中不起作用

CSS3 transform: rotate; in IE9

CSS3变换:旋转;在IE9中

I'd be willing to use jQuery, but I don't know it well enough to code it myself.

我愿意使用jQuery,但我不太清楚它自己编写代码。

Update

Below is a link to a new question I asked about how to solve using jQuery. If you can help I'll make you a cake. Or a pie.

下面是我询问如何使用jQuery解决的新问题的链接。如果你可以帮我,我会给你一个蛋糕。或者馅饼。

Rotating a div using jQuery that's supported by IE9

使用IE9支持的jQuery旋转div

3 个解决方案

#1


4  

IE9 does not support transitions, therefore, it will not animate using the transition style.

IE9不支持转换,因此,它不会使用转换样式进行动画处理。

http://caniuse.com/#search=transition

You will have to use Javascript or a Javascript library (jQuery, etc) in order to achieve this in IE 9. So to answer your initial question, the answer is no, it should not work in IE 9. You might want to rephrase and post a new question on how to do image rotation in jquery however.

你必须使用Javascript或Javascript库(jQuery等)才能在IE 9中实现这一点。所以要回答你的初始问题,答案是否定的,它应该不适用于IE 9.你可能想要改写和然而,发布了一个关于如何在jquery中进行图像旋转的新问题。

#2


0  

Unfortunately CSS property isnt supported by IE9 and earlier

不幸的是,IE9及更早版本不支持CSS属性

transition:

to create your dealed effect you should use jQuery, Mootools or other similar Javascript library. I know that is not solution, but just hint.

要创建你的dealed效果你应该使用jQuery,Mootools或其他类似的Javascript库。我知道这不是解决方案,只是提示。

#3


-1  

What's the content type on the page? If you're not defining a content type, I believe IE9 goes into a "quirks mode". You should set your content type to the following for the best performance in IE:

页面上的内容类型是什么?如果您没有定义内容类型,我相信IE9会进入“怪癖模式”。您应该将内容类型设置为以下内容,以获得IE中的最佳性能:


推荐阅读
  • 安卓编年史(4):Android
    安卓0.9显示着横屏的主屏幕——后续一些版本无法实现的一个特性[RonAmadeo供图]尽管从功能上很难将模拟器和操作系统区分开,但安卓0.9是第一个支持横屏显示的版本。更让人惊讶 ... [详细]
  • nginx 解决跨域问题 No: 'AccessControlAllowOrigin' header is present on the requested resource
    错误信息:1, ... [详细]
  • 所有设备的CSS3媒体查询原文:https://www. ... [详细]
  • 本文介绍了如何使用PHP向系统日历中添加事件的方法,通过使用PHP技术可以实现自动添加事件的功能,从而实现全局通知系统和迅速记录工具的自动化。同时还提到了系统exchange自带的日历具有同步感的特点,以及使用web技术实现自动添加事件的优势。 ... [详细]
  • 基于PgpoolII的PostgreSQL集群安装与配置教程
    本文介绍了基于PgpoolII的PostgreSQL集群的安装与配置教程。Pgpool-II是一个位于PostgreSQL服务器和PostgreSQL数据库客户端之间的中间件,提供了连接池、复制、负载均衡、缓存、看门狗、限制链接等功能,可以用于搭建高可用的PostgreSQL集群。文章详细介绍了通过yum安装Pgpool-II的步骤,并提供了相关的官方参考地址。 ... [详细]
  • CSS3选择器的使用方法详解,提高Web开发效率和精准度
    本文详细介绍了CSS3新增的选择器方法,包括属性选择器的使用。通过CSS3选择器,可以提高Web开发的效率和精准度,使得查找元素更加方便和快捷。同时,本文还对属性选择器的各种用法进行了详细解释,并给出了相应的代码示例。通过学习本文,读者可以更好地掌握CSS3选择器的使用方法,提升自己的Web开发能力。 ... [详细]
  • 本文介绍了Perl的测试框架Test::Base,它是一个数据驱动的测试框架,可以自动进行单元测试,省去手工编写测试程序的麻烦。与Test::More完全兼容,使用方法简单。以plural函数为例,展示了Test::Base的使用方法。 ... [详细]
  • Webmin远程命令执行漏洞复现及防护方法
    本文介绍了Webmin远程命令执行漏洞CVE-2019-15107的漏洞详情和复现方法,同时提供了防护方法。漏洞存在于Webmin的找回密码页面中,攻击者无需权限即可注入命令并执行任意系统命令。文章还提供了相关参考链接和搭建靶场的步骤。此外,还指出了参考链接中的数据包不准确的问题,并解释了漏洞触发的条件。最后,给出了防护方法以避免受到该漏洞的攻击。 ... [详细]
  • Ihavethefollowingonhtml我在html上有以下内容<html><head><scriptsrc..3003_Tes ... [详细]
  • IjustinheritedsomewebpageswhichusesMooTools.IneverusedMooTools.NowIneedtoaddsomef ... [详细]
  • 解决nginx启动报错epoll_wait() reported that client prematurely closed connection的方法
    本文介绍了解决nginx启动报错epoll_wait() reported that client prematurely closed connection的方法,包括检查location配置是否正确、pass_proxy是否需要加“/”等。同时,还介绍了修改nginx的error.log日志级别为debug,以便查看详细日志信息。 ... [详细]
  • Android实战——jsoup实现网络爬虫,糗事百科项目的起步
    本文介绍了Android实战中使用jsoup实现网络爬虫的方法,以糗事百科项目为例。对于初学者来说,数据源的缺乏是做项目的最大烦恼之一。本文讲述了如何使用网络爬虫获取数据,并以糗事百科作为练手项目。同时,提到了使用jsoup需要结合前端基础知识,以及如果学过JS的话可以更轻松地使用该框架。 ... [详细]
  • 本文介绍了使用FormData对象上传文件同时附带其他参数的方法。通过创建一个表单,将文件和参数添加到FormData对象中,然后使用ajax发送POST请求进行文件上传。在发送请求时,需要设置processData为false,告诉jquery不要处理发送的数据;同时设置contentType为false,告诉jquery不要设置content-Type请求头。 ... [详细]
  • DatepickerlandedonChrome20,isthereanyattributetodisableit?MyentiresystemusesjQuery ... [详细]
  • 前端实用的CSS3技巧有哪些
    本文小编为大家详细介绍“前端实用的CSS3技巧有哪些”,内容详细,步骤清晰,细节处理妥当,希望这篇“前端实用的CSS3技巧有哪些”文章能帮助大家 ... [详细]
author-avatar
faithKOBE
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有