Create watermark for webpage and automatic adjust when windows resize.
Kind: global class
Version: 1.0.4
Author: Lruihao
Constructor of Watermark
Param | Type | Default | Description |
---|---|---|---|
options | Object |
||
[options.content] | String |
watermark's text | |
[options.appendTo] | String |
'body' |
parent of watermark's container |
[options.width] | Number |
150 |
watermark's width. unit: px |
[options.height] | Number |
20 |
watermark's height. unit: px |
[options.rowSpacing] | Number |
60 |
row spacing of watermarks. unit: px |
[options.colSpacing] | Number |
30 |
col spacing of watermarks. unit: px |
[options.rotate] | Number |
15 |
watermark's tangent angle. unit: deg |
[options.opacity] | Number |
0.1 |
watermark's transparency |
[options.fontSize] | Number |
0.85 |
watermark's fontSize. unit: rem |
[options.fontFamily] | Number |
'inherit' |
watermark's fontFamily. |
Upload watermark's text content
Kind: instance method of Watermark
Since: 1.0.0
Param | Type | Description |
---|---|---|
content | String |
watermark's text |
Rerender watermark
Kind: instance method of Watermark
Since: 1.0.0
Param | Type | Description |
---|---|---|
options | Object |
see Constructor |
Force destroy watermark
Kind: instance method of Watermark
Since: 1.0.0