A simple library to draw watermark on HTML element with multiple line.
$ npm install watermark-html
ES6 module
import Watermark from 'watermark-html';CommonJS
let Watermark = require('watermark-html');Watermark.set({
title: 'some text',
subtitle: 'another text'
})| Param | Type | Description | Extra |
|---|---|---|---|
| title | {string} | main text | |
| subtitle | {string} | second text | |
| width | {number} | stage width | optional,default 240 |
| height | {number} | stage height | optional,default 180 |
| angle | {number} | text rotate angle | optional,default -20,value range: [-180, 180] |
| fontSize | {string} | text font size | optional,default '22px' |
| alpha | {number} | text opcity | optional,default 0.2,value range: [0.01, 1] |
Watermark.remove();