XUL Box Model-XUL Box 模型知识点

All CSS properties involving lengths should be handled with caution. We recommended that you use proportional units (em, %) instead of absolute units (px) whenever possible. Using the former allows the UI to scale proportionately depending on font size settings, which are often changed by users with accessibility limitations. A common exception to this rule is when your CSS is directly related to images, where you'll usually handle measurements in pixels (px).

所有的涉及长度(width,height等)必须小心的使用。我们建议你尽可能使用成比例的单位(em,%)来代替绝对的单位(px)。使用前者允许UI根据字体尺寸的设置来按比例改变,因为字体尺寸会经常被用户改变。

 

Also, just like in HTML, you can control the dimensions of inflexible elements using the width and height CSS properties and attributes. These attributes won't have any effect on flexible elements.

你也可以向HTML一样用css的width和height属性来设置元素的宽度和高度 ,但是这些属性不会对添加了flex属性的元素起作用

posted @ 2013-09-07 22:57  muhawo  阅读(184)  评论(0编辑  收藏  举报