🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

@hao360/watermarkjs

Package Overview
Dependencies
Maintainers
7
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hao360/watermarkjs

web watermark tool

latest
npmnpm
Version
1.2.3
Version published
Weekly downloads
8
-20%
Maintainers
7
Weekly downloads
 
Created
Source

watermarkjs

网页水印工具

安装

npm install @hao360/watermarkjs

Useage

通过 ESModule

import WaterMark from '@hao360/watermarkjs'

WaterMark(['水印', 'watermark'])

通过 script 标签

<script src="./dist/watermarkjs.umd.js"></script>
<script>
  WaterMark(['水印', 'watermark'])
</script>

参数说明

WaterMark(content, options);

content

水印字符串/水印字符串数组

options [可选]

fontSize【字体大小】

  • 类型: string
  • 默认: 16px

fontColor【字体颜色】

  • 类型: string
  • 默认: rgba(0,0,0, .1)

gridWidth【栅格宽度】

  • 类型: number
  • 默认:150

target【插入节点】

  • 类型: Element
  • 默认:document.body

needShow【自动添加】

  • 类型: boolean
  • 默认:true

style【水印层样式 】

  • 类型: Object

浏览器支持

IE9+

FAQs

Package last updated on 27 Jun 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts