问题描述
我用 XML 创建了一个按钮。添加静态图像时。我看到图片比添加的按钮字符串大。
按钮的 XML 代码片段:
<div class="form_button_small"> <button name="button_price_plan" type="object"
string="normal Plan" style="width:100%%; height:70px;"
icon="/ra/static/src/img/rsz-price.png"/>
我们如何减小与图像字符串兼容的图像的大小。
解决方法
试试用这种方式:
<button type="object" name="some_action"><img src="/module_name/static/images/Transfer.svg" style="height: 25px;margin-left: 10px;"/></button>
希望这对你有用。