Files
2018-10-16 21:32:40 +05:30

22 lines
423 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: Make an Image Responsive
localeTitle: 使图像响应
---
## 使图像响应
按照说明:
添加img标记的样式规则使其响应其容器的大小。它应该显示为块级元素它应该适合其容器的整个宽度而不拉伸并且它应该保持其原始的宽高比。
风格变成:
```css
<style>
img {
max-width: 100%;
display: block;
height: auto;
}
</style>
```