Skip to content

Latest commit

 

History

History
66 lines (48 loc) · 2.24 KB

README.md

File metadata and controls

66 lines (48 loc) · 2.24 KB

Watermark

Create watermark for webpage and automatic adjust when windows resize.

Kind: global class
Version: 1.0.4
Author: Lruihao

new Watermark(options)

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.

watermark.upload(content)

Upload watermark's text content

Kind: instance method of Watermark
Since: 1.0.0

Param Type Description
content String watermark's text

watermark.render(options)

Rerender watermark

Kind: instance method of Watermark
Since: 1.0.0

Param Type Description
options Object see Constructor

watermark.destroy()

Force destroy watermark

Kind: instance method of Watermark
Since: 1.0.0