我在使用任何使用默认 webkit 引擎的浏览器(例如默认浏览器、Dolphin HD、Amazon Kindle Fire Silk 浏览器等)在 Android 2.3 中使用 CSS3 2D 转换时遇到问题。 Android 2.3 webkit 引擎确实支持 2D 转换,我已经能够让一些具有 2D 转换的网站正确呈现,但不是我的网站!
有谁知道 Android 2.3 中可能导致与 2D 变换发生冲突的任何问题?或者,有没有一种好方法可以只为使用 Android 2.3 webkit 渲染引擎的浏览器定位 css?当我使用 Modernizr 时,在这种情况下它不起作用,因为 Android 2.3 浏览器对 2D 转换测试呈阳性。
这是我的网站:http://StevenGerner.com .在首页上,我旋转了两个元素 -90 度(站点标题和一个 h2 元素),并且在 android 2.3 浏览器上都不会旋转。我什至尝试过其他 css 转换,但似乎没有任何转换。如果我将整个页面简化为基本页面,那么转换将完美无缺,所以我的网站上可能存在其他冲突,我就是想不通是什么!这是特定于转换的 CSS:
//Applied to the h2 element which says 'howdy' at the top of the page
#about-front h2 {
display: inline-block;
float: left;
-ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=4)"\9;
-webkit-transform: rotate(-90deg);
-webkit-transform-origin: 170% 170%;
-moz-transform: rotate(-90deg);
-moz-transform-origin: 170% 170%;
-ms-transform: rotate(-90deg);
-ms-transform-origin: 170% 170%;
-o-transform: rotate(-90deg);
-o-transform-origin: 170% 170%;
transform: rotate(-90deg);
transform-origin: 170% 170%;
width: 1em;
text-shadow: -1px 0 #777, 0 2px #333, 2px 0 #333, 0 -1px #777;
}
//Applied to the site title with a media query between 500px and 750px
div#site_name {
display: block;
line-height: 0.85em;
-ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=4)"\9;
-webkit-transform: rotate(-90deg);
-webkit-transform-origin: 160% 130%;
-moz-transform: rotate(-90deg);
-moz-transform-origin: 160% 130%;
-ms-transform: rotate(-90deg);
-ms-transform-origin: 160% 130%;
-o-transform: rotate(-90deg);
-ms-transform-origin: 160% 130%;
transform: rotate(-90deg);
transform-origin: 160% 130%;
}
该问题也可能适用于 Android 2.2;但是,我目前没有要测试的任何 2.2 设备。
如果有任何想法、建议和建议,我将不胜感激!这让我抓狂!
最佳答案
Notes
Internet Explorer 5.5 or later supports a proprietary Matrix Filter which can be used to achieve a similar effect.
Gecko 14.0 removed the experimental support for skew(), but it was reintroduced in Gecko 15.0 for compatibility reasons. As it is non-standard and will likely be removed in the future, do not use it.
Android 2.3 has a bug where input forms will "jump" when typing, if any container div has a -webkit-transform.
来源:https://developer.mozilla.org/en-US/docs/Web/CSS/transform
关于Android 2.3 浏览器无法呈现某些 CSS3 2D 转换,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12185282/
我在从html页面生成PDF时遇到问题。我正在使用PDFkit。在安装它的过程中,我注意到我需要wkhtmltopdf。所以我也安装了它。我做了PDFkit的文档所说的一切......现在我在尝试加载PDF时遇到了这个错误。这里是错误:commandfailed:"/usr/local/bin/wkhtmltopdf""--margin-right""0.75in""--page-size""Letter""--margin-top""0.75in""--margin-bottom""0.75in""--encoding""UTF-8""--margin-left""0.75in""-
我在MiniTest::Spec和Capybara中使用以下规范:find_field('Email').must_have_css('[autofocus]')检查名为“电子邮件”的字段是否具有autofocus属性。doc说如下:has_css?(path,options={})ChecksifagivenCSSselectorisonthepageorcurrentnode.据我了解,字段“Email”是一个节点,因此调用must_have_css绝对有效!我做错了什么? 最佳答案 通过JonasNicklas得到了答案:No
我对最新版本的Rails有疑问。我创建了一个新应用程序(railsnewMyProject),但我没有脚本/生成,只有脚本/rails,当我输入ruby./script/railsgeneratepluginmy_plugin"Couldnotfindgeneratorplugin.".你知道如何生成插件模板吗?没有这个命令可以创建插件吗?PS:我正在使用Rails3.2.1和ruby1.8.7[universal-darwin11.0] 最佳答案 随着Rails3.2.0的发布,插件生成器已经被移除。查看变更日志here.现在
我尝试运行2.x应用程序。我使用rvm并为此应用程序设置其他版本的ruby:$rvmuseree-1.8.7-head我尝试运行服务器,然后出现很多错误:$script/serverNOTE:Gem.source_indexisdeprecated,useSpecification.Itwillberemovedonorafter2011-11-01.Gem.source_indexcalledfrom/Users/serg/rails_projects_terminal/work_proj/spohelp/config/../vendor/rails/railties/lib/r
我正在尝试在我的centos服务器上安装therubyracer,但遇到了麻烦。$geminstalltherubyracerBuildingnativeextensions.Thiscouldtakeawhile...ERROR:Errorinstallingtherubyracer:ERROR:Failedtobuildgemnativeextension./usr/local/rvm/rubies/ruby-1.9.3-p125/bin/rubyextconf.rbcheckingformain()in-lpthread...yescheckingforv8.h...no***e
我花了三天的时间用头撞墙,试图弄清楚为什么简单的“rake”不能通过我的规范文件。如果您遇到这种情况:任何文件夹路径中都不要有空格!。严重地。事实上,从现在开始,您命名的任何内容都没有空格。这是我的控制台输出:(在/Users/*****/Desktop/LearningRuby/learn_ruby)$rake/Users/*******/Desktop/LearningRuby/learn_ruby/00_hello/hello_spec.rb:116:in`require':cannotloadsuchfile--hello(LoadError) 最佳
我在pry中定义了一个函数:to_s,但我无法调用它。这个方法去哪里了,怎么调用?pry(main)>defto_spry(main)*'hello'pry(main)*endpry(main)>to_s=>"main"我的ruby版本是2.1.2看了一些答案和搜索后,我认为我得到了正确的答案:这个方法用在什么地方?在irb或pry中定义方法时,会转到Object.instance_methods[1]pry(main)>defto_s[1]pry(main)*'hello'[1]pry(main)*end=>:to_s[2]pry(main)>defhello[2]pry(main)
我正在尝试在Ruby中制作一个cli应用程序,它接受一个给定的数组,然后将其显示为一个列表,我可以使用箭头键浏览它。我觉得我已经在Ruby中看到一个库已经这样做了,但我记不起它的名字了。我正在尝试对soundcloud2000中的代码进行逆向工程做类似的事情,但他的代码与SoundcloudAPI的使用紧密耦合。我知道cursesgem,我正在考虑更抽象的东西。广告有没有人见过可以做到这一点的库或一些概念证明的Ruby代码可以做到这一点? 最佳答案 我不知道这是否是您正在寻找的,但也许您可以使用我的想法。由于我没有关于您要完成的工作
我使用的是Firefox版本36.0.1和Selenium-Webdrivergem版本2.45.0。我能够创建Firefox实例,但无法使用脚本继续进行进一步的操作无法在60秒内获得稳定的Firefox连接(127.0.0.1:7055)错误。有人能帮帮我吗? 最佳答案 我遇到了同样的问题。降级到firefoxv33后一切正常。您可以找到旧版本here 关于ruby-无法在60秒内获得稳定的Firefox连接(127.0.0.1:7055),我们在StackOverflow上找到一个类
我的主要目标是能够完全理解我正在使用的库/gem。我尝试在Github上从头到尾阅读源代码,但这真的很难。我认为更有趣、更温和的踏脚石就是在使用时阅读每个库/gem方法的源代码。例如,我想知道RubyonRails中的redirect_to方法是如何工作的:如何查找redirect_to方法的源代码?我知道在pry中我可以执行类似show-methodmethod的操作,但我如何才能对Rails框架中的方法执行此操作?您对我如何更好地理解Gem及其API有什么建议吗?仅仅阅读源代码似乎真的很难,尤其是对于框架。谢谢! 最佳答案 Ru