如何可能的是,“display:flex”和“align-items:center”不再工作在我的iphone? [英] How is possible that "display: flex" and "align-items: center" do not work anymore on my iphone?

查看:510
本文介绍了如何可能的是,“display:flex”和“align-items:center”不再工作在我的iphone?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你们好奇怪我今天发生了什么...
我正在编写一个代码来创建子菜单,我使用属性

  display:-webkit-flex; 
display:flex;
align-items:center;这样,各个部分(标签li)的声音被垂直居中,从而获得了



<
我已经使用这些属性多次之前的其他代码,他们一直工作正常。一如既往,我检查我的Mac上的代码,在iPhone 5,在firefox和chrome。



但是,一旦我看到通过我的iphone 5 8.3)我很震惊....属性不工作。我已显示旧文件,甚至与他们出现相同的问题。



enter image description here



令人惊讶的是,mc与我的兄弟iPhone 5完美匹配版本9.x):



http: //i.stack.imgur.com/1bHhT.jpg



我不明白....但是怎么可能?



这是一个错误?


解决方案

我应该前缀建议flexbox仍然是供应商前缀。有趣的是,我会说,它真的只需要在Safari上加上前缀。



这意味着不是 供应商在您的显示设置前加上所有Flex框属性:

  display:-webkit-flex; 
display:flex;
-webkit-align-items:center;
align-items:center;


Hello guys is really strange what happened to me today ... I'm working on a code to create submenus, and I used the property

 display: -webkit-flex;
 display: flex;
 align-items: center;

in this way the voices of the various sections (tags li) are centered vertically. I have used these properties many times before for other codes and they have always worked correctly. As always, I check the code on my mac, on the iPhone 5, on firefox and chrome.

But as soon as I see the file via my iphone 5 (version 8.3) I was shocked .... the properties were not working. I have displayed the old files and even with them the same problem occurred.

enter image description here

The amazing thing is that the mc works wonderfully well with the iPhone 5 to my brother (updated to version 9.x):

http://i.stack.imgur.com/1bHhT.jpg

I do not understand .... but how is that possible?

It 'a bug? or my iphone is broken?

解决方案

Should I Prefix recommends that flexbox still be vendor-prefixed. Anecdotally, I would say that it really only needs to be prefixed on Safari.

This means not only vendor prefixing your display settings, but all Flex box properties:

 display: -webkit-flex;
 display: flex;
 -webkit-align-items: center;
 align-items: center;

这篇关于如何可能的是,“display:flex”和“align-items:center”不再工作在我的iphone?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆