Skip to content

Commit d6acbde

Browse files
committed
add
add
1 parent 132dc26 commit d6acbde

File tree

5 files changed

+21
-0
lines changed

5 files changed

+21
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
layout: post
3+
title: 缩略图的三种方式
4+
---
5+
6+
缩略图一般可以分为三种方式。
7+
1. 等比例缩小
8+
2. 等比例缩小后补白
9+
3. 等比例缩小后裁剪
10+
11+
第一种方式不能保证图片尺寸,第二种会有美观问题,第三种最完美。
12+
13+
图里:
14+
![totoro](/img/totoro.jpg)
15+
![totoro1](/img/totoro-1.jpg)
16+
![totoro2](/img/totoro-2.jpg)
17+
![totoro3](/img/totoro-3.jpg)
18+
19+
代码:
20+
[php 缩略图](https://github.com/imdongyu/php-class/blob/master/Image.class.php)
21+

img/totoro-1.jpg

2.64 KB
Loading

img/totoro-2.jpg

4.67 KB
Loading

img/totoro-3.jpg

4 KB
Loading

img/totoro.jpg

11.1 KB
Loading

0 commit comments

Comments
 (0)