watermark.wxml组件
<view class="water_top" style="pointer-events: none;">
<view class="water-text" wx:for="{
{50}}">{
{watermarkText}}</view>
</view>
watermark.wxss
.water_top{
position: fixed;
top:0;
bottom: 0;
left: 0;
right: 0;
/* background: #999; */
transform:rotate(-10deg);
/* opacity: 0.9; */
z-index: 9999999999;
}
.water-text{
float: left;
width:375rpx;
color: rgba(169,169,169,.2);
text-align: center;
font-size: 40rpx;
margin: 100rpx 0;
}
.watermark {
position: fixed;
top: 0;
width: 100%;
height: 100%;
background: #eeeeee11;
pointer-events: none;
background-repeat: repeat;
background-size: 50% auto;
}
.canvas {
width: 200px;
height: 200px;
position: fixed;
left: -200%;
}
watermark.js