Nginx ngx_http_empty_gif_module模块指令整理

原创文章,转载请指明出处并保留原文url地址

本文主要针对nginx的ngx_http_empty_gif_module模块做简单介绍,本文具体包括如下指令:

empty_gif

ngx_http_empty_gif_module模块产生单像素透明的gif图片

配置例子如下

location = /_.gif {

empty_gif;

}

Nginx原文:

The module ngx_http_empty_gif_module emits single-pixel transparent GIF.

Example Configuration

location = /_.gif {

empty_gif;

}

1. empty_gif

syntax:empty_gif;
default:
context:location

在当前location里使用这个模块处理请求。

Nginx原文:

Turns on module processing in a surrounding location.

 

单像素透明的gif图片有什么作用?下面是一个作用:

单像素的GIF文件控控制文本位置

要想准确的控制HTML中的文本位置,可以做一个1*1的透明图(如Blank.gif)。然后在HTML中加入代码:
<img src="Blank.gif" hspace=100>
改变数字100,即可控制

发表评论