html2canvas竖排文本错乱,html2canvas border-bottom 多行错位

html2canvas border-bottom 多行错位,只在最后一行显示并且还错位

效果如下图:

70d2d3a44898

image.png

页面代码如下:

.cnt {

color: #ffcd03;

text-align: center;

border-bottom: 0.04rem solid #fff;

}

我是来测试啦~ 

为啥子呢?沃德天

修改如下:

添加一个从第二行开始包一层标签(p、div),注意千万不要用span

.cnt {

color: #ffcd03;

text-align: center;

border-bottom: 0.04rem solid #fff;

}

我是来测试啦~ 测试html2c

anvas多行文本内容是设置

border-bottom错位啦 

,为啥子呢?沃德天

最终实现了效果:

70d2d3a44898

image.png

ps: html2canvas使用版本最稳定的是rc4,千万不要用rc5,rc5版本在ios13系统下不能生成图片

PS: 使用css的 text-decoration下划线,再Android上生成图片是正常,在Ios上依旧下滑线位置错乱

color: #ffcd03;

text-align: center;

/* text-decoration:underline;

-webkit-text-decoration:underline;

text-decoration-color: #FFF;

-webkit-text-decoration-color: #FFF;

-moz-text-decoration-color: #FFF; /

/ text-underline-position: under; */

text-underline-position: right under;

text-underline-position: below;

展示如下图

70d2d3a44898

IOS css展示

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值