1.0.0 • Published 6 years ago

h5-water-mark v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
6 years ago

water-mark

水印功能(文字跑马灯效果)

Install

npm install --save h5-water-mark

Usage

const waterMark = require('h5-water-mark');
waterMark(captionParameter);

其中captionParameter 是一个对象,需包含如下键值对

 captionParameter = {
    isShowCaption: true,// 是否显示跑马灯水印
    parentElement: '父元素',// 传入需要使用跑马灯的父元素,DOM元素 
    userId: '用户的userID',// 用户userId
    captionVerticalRange: [],// 垂直坐标范围
    captionFontSize: 2,// 文字字体大小,单位px
    captionFontColor: '#ffffff', // 文字颜色
    captionFontOpacity: 1,// 文字不透明度,范围是 0-1,1为完全不透明
    captionBackgroundColor: '',// 文字底色
    captionSpeed: 200,// 跑马灯速度,单位px/s
    captionIntervalTime: 600,// 文字显示间隔时间,单位s
    captionContent: ''// 自定义文字内容
  };