19 lines
576 B
Markdown
19 lines
576 B
Markdown
|
---
|
|||
|
title: Use a Retina Image for Higher Resolution Displays
|
|||
|
localeTitle: 使用Retina图像获得更高分辨率的显示
|
|||
|
---
|
|||
|
## 使用Retina图像获得更高分辨率的显示
|
|||
|
|
|||
|
按照说明:
|
|||
|
|
|||
|
将img标记的宽度和高度设置为原始值的一半。在这种情况下,原始高度和原始宽度都是200px。
|
|||
|
|
|||
|
风格4变为:
|
|||
|
|
|||
|
```css
|
|||
|
<style>
|
|||
|
img { height: 100px; width: 100px; }
|
|||
|
</style>
|
|||
|
```
|
|||
|
|
|||
|
请注意,使图像显示为“视网膜”(并为视网膜显示进行优化)的最简单方法是将其宽度和高度值定义为原始文件的一半。
|