不用HTML的方式,而是以CSS的方式

This commit is contained in:
枫谷剑仙 2020-12-21 15:59:46 +08:00
parent cd168278e9
commit 246acd5dad
2 changed files with 2 additions and 1 deletions

View File

@ -525,7 +525,7 @@ function cardN(id){
function descriptionToHTML(str)
{
str = str.replace(/\n/ig,"<br>"); //换行
str = str.replace(/ /ig,"&nbsp;"); //换行
//str = str.replace(/ /ig,"&nbsp;"); //换行
str = str.replace(/\^([a-fA-F0-9]+?)\^([^\^]+?)\^p/igm,'<span style="color:#$1;">$2</span>'); //文字颜色
str = str.replace(/\%\{m([0-9]{1,4})\}/g,function (str, p1, offset, s){return cardN(parseInt(p1,10)).outerHTML;}); //怪物头像
return str;

View File

@ -79,6 +79,7 @@ body{
box-sizing: border-box;
padding: 1px;
margin: 0;
white-space: pre-wrap;
}
.guide-mod .control-box>div.status