因为你的图片内容本身没有居中,所以绘制出来不美观。
针对这种情况,虚表库增加了 offsetx、offsety 属性,用于图片偏移,让你在图片本身内容不居中的情况下,调整图片位置,达到在单元格中居中的效果。
请下载新版虚表库,然后用下面的代码( offsety 属性 ),让第二列图片水平居中、垂直居中
var t = {
{"通道1","<img name='SWOFF',offsety=3,w=90,h=40>","<img name='DIOFF',w=36,h=36>" }
{"通道2","<img name='SWOFF',offsety=3,w=90,h=40>","<img name='DIOFF',w=36,h=36>" }
{"通道3","<img name='SWOFF',offsety=3,w=90,h=40>","<img name='DIOFF',w=36,h=36>" }
{"通道4","<img name='SWOFF',offsety=3,w=90,h=40>","<img name='DIOFF',w=36,h=36>" }
{"通道5","<img name='SWOFF',offsety=3,w=90,h=40>","<img name='DIOFF',w=36,h=36>" }
{"通道6","<img name='SWOFF',offsety=3,w=90,h=40>","<img name='DIOFF',w=36,h=36>" }
{"通道7","<img name='SWOFF',offsety=3,w=90,h=40>","<img name='DIOFF',w=36,h=36>" }
{"通道8","<img name='SWOFF',offsety=3,w=90,h=40>","<img name='DIOFF',w=36,h=36>" }
{"通道9","<img name='SWOFF',offsety=3,w=90,h=40>","<img name='DIOFF',w=36,h=36>" }
{"通道10","<img name='SWOFF',offsety=3,w=90,h=40>","<img name='DIOFF',w=36,h=36>" }
{"通道11","<img name='SWOFF',offsety=3,w=90,h=40>","<img name='DIOFF',w=36,h=36>" }
{"通道12","<img name='SWOFF',offsety=3,w=90,h=40>","<img name='DIOFF',w=36,h=36>" }
{"总控开关","<img name='ALLOFF',w=90,h=40>","" }
}