2014-11-24 09:52:13 shenjie12345678 阅读数 49828

由于开发的时候老是记不住各个设备屏幕尺寸对应的像素,特此在苹果开发者文档上将这些记录了下来,方便查阅.

Screenshot Properties

Device

Specifications

Editable

3.5-Inch Retina Display Screenshots(required)

One screenshot is required. Up to four additional screenshots can be uploaded. You can rearrange the screenshots when you create or edit the iTunes Connect record.

Don’t include the device status bar in your screenshots. Screenshot requirements are:

  • 72 dpi, RGB, flattened, no transparency

  • High-quality JPEG or PNG image file format

  • Any of the following sizes:

    • 640 x 920 pixels for hi-res portrait (without status bar) minimum

    • 640 x 960 pixels for hi-res portrait (full screen) maximum

    • 960 x 600 pixels for hi-res landscape (without status bar) minimum

    • 960 x 640 pixels for hi-res landscape (full screen) maximum

    ../Art/ipod_dim_2x.png

Locked

4-Inch Retina Display Screenshots (Required)

You’re required to upload at least one of these screenshots.

Up to four additional optional screenshots can be uploaded. You can rearrange the screenshots when you create or edit the iTunes Connect record.

Don’t include the device status bar in your screenshots. Screenshot requirements are:

  • 72 dpi, RGB, flattened, no transparency

  • High-quality JPEG or PNG image file format

  • Any of the following sizes:

    • 640 x 1096 pixels for portrait (without status bar) minimum

    • 640 x 1136 pixels for portrait (full screen) maximum

    • 1136 x 600 pixels for landscape (without status bar) minimum

    • 1136 x 640 pixels for landscape (full screen) minimum

    ../Art/iphone_dim_2x.png

Locked

4.7-inch Retina screenshot

If your app indicates that it is optimized for the iPhone 6, at least one 4.7-inch screenshot is required. Up to four additional screenshots can be uploaded. You can rearrange the screenshots when you create or edit the iTunes Connect record.

Don’t include the device status bar in your screenshots. Screenshot requirements are:

  • 72 dpi, RGB, flattened, no transparency

  • High-quality JPEG or PNG image file format

  • 750 x 1334 pixels for hi-res portrait

  • 1334 x 750 pixels for hi-res landscape

Locked

5.5-inch Retina screenshot

If your app indicates that it is optimized for the iPhone 6 Plus, at least one 5.5-inch screenshot is required. Up to four additional screenshots can be uploaded. You can rearrange the screenshots when you create or edit the iTunes Connect record.

Don’t include the device status bar in your screenshots. Screenshot requirements are:

  • 72 dpi, RGB, flattened, no transparency

  • High-quality JPEG or PNG image file format

  • 1242 x 2208 pixels for hi-res portrait

  • 2208 x 1242 pixels for hi-res landscape

Locked

iPad Screenshots(required if app runs on iPad)

If your binary indicates that your app runs on iPad, you’re required to upload at least one iPad screenshot.

Up to four additional screenshots can be uploaded. You can rearrange the screenshots when you create or edit the iTunes Connect record.

Don’t include the device status bar in your screenshots. Screenshots requirements are:

  • 72 dpi, RGB, flattened, no transparency

  • High-quality JPEG or PNG image file format

  • Any of the following sizes:

    • 1024 x 748 pixels for landscape (without status bar) minimum

    • 1024 x 768 pixels for landscape (full screen) maximum

    • 2048 x 1496 pixels for hi-res (without status bar) minimum

    • 2048 x 1536 pixels for hi-res landscape (full screen) maximum

    • 768 x 1004 pixels for portrait (without status bar) minimum

    • 768 x 1024 pixels for portrait (full screen) maximum

    • 1536 x 2008 pixels for hi-res portrait (without status bar) minimum

    • 1536 x 2048 pixels for hi-res portrait (full screen) maximum

    ../Art/ipad_dim_2x.png

Locked

2016-05-13 18:50:59 tiebanshao 阅读数 143

iphone

导航栏高度:

电池状态栏高度:

tabbar高度

3.5寸屏像素大小

4寸屏像素大小

4.7寸屏像素大小

2018-12-26 11:07:28 weixin_41863239 阅读数 694

记录一下Window.devicePixelRatio这个特性。

介绍:Window.devicePixelRatio 返回当前显示设备的物理像素分辨率与CSS像素分辨率的比值。该值也可以被解释为像素大小的比例:即一个CSS像素的大小相对于一个物理像素的大小的比值。

window.devicePixelRatio是设备上物理像素和设备独立像素(device-independent pixels (dips))的比例。
公式表示就是:window.devicePixelRatio = 物理像素 / dips

dip或dp,(device independent pixels,设备独立像素)与屏幕密度有关

当页面设置了<meta name="viewport" content="width=device-width">时候,document.documentElement.clientWidth在大部分浏览器下,得到的是布局视区的宽度,等同于dips的宽度。

所以,设备独立像素等同于css像素分辨率,也就是说,我们在编写css的时候,需要按照设备独立像素编写。

获得当前设备的设备相比

alert(window.devicePixelRatio);

作用

1.我们可以通过设置window.devicePixelRatio的值来实现清晰的网页显示

2.为了更好的提升用户体验,节省移动端的流量,针对不同的显示屏,我们可以采取不用的方案,保证图片在不同显示屏幕下正常展现,通过判断 devicePixelRatio 的值就可以区分普通显示屏和高清屏,然后加载不同尺寸的图片

后面用到的话,会继续更新。

参考文章:

设备像素比devicePixelRatio简单介绍

web移动端,需要清楚设备像素比devicePixelRatio的应用

Window.devicePixelRatio

2016-03-25 10:49:46 crystal_9527 阅读数 181

1.iOS设备坐标系

retina屏(3.5寸)
像素 640 X 960 (0,0) (320,480) 329
iphone4/4s

retina屏 (4寸)
像素 640 X 1136 (0, 0) (320, 568) 325
iphone5/5c/5s

retina屏 (4.7寸)
像素 750 X 1134 (0, 0) (375, 667) 289
iphone6

retina屏 (5.5寸)
像素 1242 X 2208 (0, 0) (414, 736)
iphone6p

iPad
普通屏
像素 768 X 1024 (0, 0) (768, 1024)
iPad1/2/mini

retina屏
像素 1536 X 2048 (0, 0)(768, 1024)
new iPad, iPad4, air

  1. 拿到当前设备的版本号

    [UIDevice currentDevice].systemVersion.floatValue

3.获取当前设备屏幕大小

[UIScreen mainScreen].bounds

4.//更改状态栏样式 黑/白
-(UIStatusBarStyle)preferredStatusBarStyle{
return UIStatusBarStyleLightContent;
}

2019-03-14 18:34:31 lihefei_coder 阅读数 186

方法一

.line {
	height: 0.5px;
	background-color: gray;
}

优点:设置简单,ios上实用
缺点:安卓不兼容

方法二

.line {
	height: 1px;
	background-color: gray;
	transform: scaleY(0.5);
}

优点:设置简单,兼容ios和安卓
缺点:安卓上效果粗糙

方法三

/* 线条 */
.line {
	height: 0;
	border-botton: 1px solid gray;
	transform: scaleY(0.5);
}

/* 盒子 */
.box {
	position: relative;
	width: 300px;
	height: 200px;
	border-radius: 4px;
}
.box::after {
	content: '';
	position: absolute;
	left: 0;
	top: 0;
	width: 200%;
	height: 200%;
	border: 1px solid #aaa;
	border-radius: 8px;
	transform-origin: 0 0;
	transform: scale(.5);
	pointer-events: none;
}

优点:兼容ios和安卓,效果细腻
缺点:代码较多

iOS 启动页image大小

阅读数 200

没有更多推荐了,返回首页