@ygkit/watermark
v0.1.0
Published
Watermark TODO
Downloads
62
Readme
@ygkit/watermark
A watermark package for the browser.
Installation
pnpm i @ygkit/watermark
Usage
import { InitWaterMark } from '@ygkit/watermark'
InitWaterMark({
text: 'Hello, World!',
container: document.body,
})
API
InitWaterMark(options: WaterMarkOptions): void
options
text
: string - The text of the watermark.createTime
: string - The create time of the watermark. Default:new Date().toLocaleDateString()
.container
: HTMLElement - The container of the watermark. Default:document.body
.font
: string - The font of the watermark. Default:'12px Microsoft Yahei'
.color
: string - The color of the watermark. Default:'rgba(200, 200, 200, 0.40)'
.width
: number - The width of the watermark. Default:300
.height
: number - The height of the watermark. Default:240
.rotate
: number - The rotate of the watermark. Default:-15
.zIndex
: number - The z-index of the watermark. Default:999999
.
License
MIT