Skip to content

Commit

Permalink
新增 PixelRatio 说明
Browse files Browse the repository at this point in the history
  • Loading branch information
doyoe committed May 17, 2017
1 parent 18f4d60 commit 54306f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -215,7 +215,7 @@ var styles = StyleSheet.create({

`React-Native` 中,访问设备像素密度的方法由 `PixelRatio` 类提供。

通常一个应用都会运行在不同的设备上,并且这些设备的像素密度很有可能各不相同。这会造成一个现象就是:
我们的应用通常都会运行在不同的设备上,并且这些设备的像素密度很有可能各不相同。这会造成一个现象就是:

* 定义了元素的边框为 `1像素`,而实际上在不同像素密度的设备上结果不一样,比如:iPhone6 显示为 `2像素`,iPhone6 Plus 显示为 `3像素`
* 对于一个图片来讲,因为设备的像素密度不同,它也需要对应不同尺寸的规则,以防止图片过小变得模糊;
Expand Down

0 comments on commit 54306f4

Please sign in to comment.