---
id: 587d78b1367417b2b2512b0a
title: Use a Retina Image for Higher Resolution Displays
challengeType: 0
videoUrl: ''
localeTitle: 使用Retina图像获得更高分辨率的显示
---
## Description
使图像显示为“视网膜”(并为视网膜显示进行优化)的最简单方法是将其width
和height
值定义为原始文件的一半。以下是仅使用原始高度和宽度的一半的图像示例: <风格>
img {身高:250px;宽度:250px; }
</样式>
<img src =“coolPic500x500”alt =“最精彩的图片”>
## Instructions
将img
标记的width
和height
设置为原始值的一半。在这种情况下,原始height
和原始width
都是200px。
## Tests
```yml
tests:
- text: 你的img
标签应该有100像素的width
。
testString: 'assert($("img").css("width") == "100px", "Your img
tag should have a width
of 100 pixels.");'
- text: 你的img
标签应该有100像素的height
。
testString: 'assert($("img").css("height") == "100px", "Your img
tag should have a height
of 100 pixels.");'
```
## Challenge Seed
```html
```
## Solution
```js
// solution required
```