[]富文本排版问题

let div:Laya.HTMLDivElement = new Laya.HTMLDivElement();
let htmlStr:string = "";
 
htmlStr += "<span style='font-weight:bold;font:24px Arial' color='#fafbf9'>累计进行关卡</span>";
htmlStr += "<span style='font-weight:bold;font:48px Arial;valign:top' color='#84ED4A'>3</span>";
htmlStr += "<span style='font-weight:bold;font:24px Arial' color='#fafbf9'>次1</span>";
 
div.innerHTML = htmlStr;
div.style.align = "left";
div.style.valign = "top";
div.style.width = 300;
Laya.stage.addChild(div); 
以上是一段富文本生成代码,效果是这样的:

字体.png

那个数字3的位置偏的很厉害,有没有什么办法xi修正?
已邀请:

Aar0n

赞同来自:

发个可运行demo来,帮你看一下

小伦

赞同来自:

附件为demo

Aar0n

赞同来自:

这块只能用同样大小的字号。 如果想要大字效果,需要换方式实现。

要回复问题请先

商务合作
商务合作