|
@@ -178,9 +178,10 @@ function setFont(str,txtdiv){
|
|
txtdiv.innerHTML=innertxt;
|
|
txtdiv.innerHTML=innertxt;
|
|
|
|
|
|
let width=(window.innerWidth-txtdiv.clientWidth)/2;
|
|
let width=(window.innerWidth-txtdiv.clientWidth)/2;
|
|
- let fontsize=14/1920 *window.innerWidth;
|
|
|
|
|
|
+ let fontsize=20/1920 *window.innerWidth;
|
|
let left=(width/window.innerWidth)*100+"%";
|
|
let left=(width/window.innerWidth)*100+"%";
|
|
- let styleStr="position: absolute;z-index: 100;bottom: 10%;background-color:rgba(157,96,34,0.5);color:white;left:"+left+";font-size:"+fontsize+"px;";
|
|
|
|
|
|
+ let padding=fontsize/2+"px "+fontsize/2+"px "+fontsize/2+"px "+fontsize/2+"px";
|
|
|
|
+ let styleStr="position: absolute;z-index: 100;bottom: 10%;background-color:rgba(157,96,34,0.5);padding:"+padding+";color:white;left:"+left+";font-size:"+fontsize+"px;";
|
|
//styleStr+="lineHeight:"+5*rows+"px;";
|
|
//styleStr+="lineHeight:"+5*rows+"px;";
|
|
styleStr+="height:"+20*rows+"px"
|
|
styleStr+="height:"+20*rows+"px"
|
|
txtdiv.setAttribute('style',styleStr);
|
|
txtdiv.setAttribute('style',styleStr);
|