display = -webkit-box是做什么的? [英] what does display=-webkit-box do?
本文介绍了display = -webkit-box是做什么的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我只是触摸此代码并在谷歌搜索很多,以找出它做了什么,但没有找到合适的指南。我发现它让我的网络响应的一件事。
所以这一切是做什么的?
i just touch this code and search alot on google to find out what does it do but didnt find suitable guide. what one thing i found its make my web responsive.
so what does all this do??
body{
width: 100%;
display: -webkit-box;/*new technology*/
-webkit-box-pack: center;
}
推荐答案
您的CSS用于居中正文的子元素
元素使用box-pack属性
webkit-box用于Safari,Opera
和Chrome
(其他CSSIE
[-ms-flexbox],FF
[-moz-box])
Your CSS is used to center the child elements of a thebody
element by using the box-pack property
The webkit-box is used forSafari, Opera
, andChrome
(other CSS forIE
[-ms-flexbox],FF
[-moz-box])
body{
/*...*/
-webkit-box-pack:center;
/*...*/
} /* See below explanation */
额外的空间是平均分配的,一半放在第一个孩子面前,另一半放在最后一个孩子之后。
Extra space is divided evenly, with half placed before the first child and the other half placed after the last child.
body{
/*...*/
-webkit-box-align:center;
/*...*/
} /* See below explanation */
任何额外的空间均分,一半放在孩子的上方,另一半放在孩子的下方。
干杯,
Edo
Any extra space is divided evenly, with half placed above the child and the other half placed below the child.
Cheers,
Edo
这篇关于display = -webkit-box是做什么的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文