CSS Windows 8 Metro风格应用程序中的fr单元是什么意思?

前端之家收集整理的这篇文章主要介绍了CSS Windows 8 Metro风格应用程序中的fr单元是什么意思?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
看看下面的CSS在Windows 8 metro风格的应用程序,什么是“fr”?
-ms-grid-columns: 638px 1fr;

解决方法

它代表“分数”或“分数单位”,在CSS级别3中提出的单位。

https://www.w3.org/TR/css3-grid-layout/#fr-unit

Fraction values are new units applicable to the grid-rows and grid-columns properties…
The distribution of fractional space occurs after all or content-based row and column sizes have reached their maximum. The total size of the rows or columns is then subtracted from the available space and the remainder is divided proportionately among the fractional rows and columns.

http://msdn.microsoft.com/en-us/library/windows/apps/hh780610.aspx

…fractional unit (1FR)… represents one share of all the space available to the grid after fixed-size and auto-sized tracks (rows or columns) are laid out.

另外,从http://social.msdn.microsoft.com/Forums/en-US/winappswithhtml5/thread/95fddeb2-04bc-4f2b-bfb6-ffecffe5e8d5/

1fr is one “fractional unit”,which is a way of saying “the remaining space in the element”.

猜你在找的CSS相关文章