Skip to content

A simple library to draw watermark on HTML element with multiple line.

Notifications You must be signed in to change notification settings

lizux/watermark

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

watermark-html

A simple library to draw watermark on HTML element with multiple line.

Installation

$ npm install watermark-html

Usage

Import

ES6 module

import Watermark from 'watermark-html';

CommonJS

let Watermark = require('watermark-html');

Setup

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]

Remove

Watermark.remove();

About

A simple library to draw watermark on HTML element with multiple line.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •