watermark-webpage
TypeScript icon, indicating that this package has built-in type declarations

1.0.5 • Public • Published

给网站页面或者某个容器添加水印

watermark-webpage

add a watermark in your webpage or specified element container also you can set watermark style

Installation

  npm install  watermark-webpage --save

usage

import watermark from 'watermark-webpage';
 
//container default value is document.body
const wmContainer:HTMLElement = document.getElementById('wmcontainer');
this.waterMark:watermark = new watermark({
      container: wmContainer, 
      content: 'yangjian',
      fillStyle: "rgba(184, 184, 184, 0.4)",
      width: 250,
      height: 200
    });
 
 // destroy the watermark
 this.waterMark.destroy()
    

demo online

https://codesandbox.io/s/boring-cori-1i9k5

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.5
    0
    • latest

Version History

Package Sidebar

Install

npm i watermark-webpage

Weekly Downloads

1

Version

1.0.5

License

ISC

Unpacked Size

6.89 kB

Total Files

4

Last publish

Collaborators

  • yang03