[js]网页中添加水印

来自:https://github.com/loadchange/gwm/blob/HEAD/README-CN.md

使用方式:

<script>
  gwm.creation({ destroy: false,  });
  var type = '';
  $('.btn-apply').click(function () {
    if ($(this).data('type') === type) return;
    type = $(this).data('type');
    switch (type) {
      case 'custom':
        gwm.creation({
          txt: '13987654321',
          width: 128,
          height: 100,
          x: 20,
          y: 70,
          fontSize: 13,
          color: '#ff0000',
          destroy: false,
        });
        break;
      case 'advanced':
        gwm.creation({
          mode: 'svg',
          watch: false,
          fontSize: 12,
          font: 'sans-serif',
          alpha: 0.2,
          angle: -15,
          color: '#8a2be2',
          destroy: false,
        });
        break;
      default:
        gwm.creation({ destroy: false });
    }
  });
</script>

 

posted on 2021-09-16 18:58  z5337  阅读(107)  评论(0编辑  收藏  举报