为了账号安全,请及时绑定邮箱和手机立即绑定

當按鈕按下去後放入icon,但本身按鈕會變形

當按鈕按下去後放入icon,但本身按鈕會變形

MMMHUHU 2019-03-12 20:19:34
<button class="add_tab_v2" onclick="location.href='xxx.php';">←</button>$(".add_tab_v2").click(function(e) {    $(".add_tab_v2").html("<img class='iconBack' src='images/loading_v2.svg'>");    document.getElementById(".add_tab_v2").disabled=true;});當按下去後,丟了一張圖片給button但這樣大小會變PS: 圖片越大,越變型跟其他按鈕會不一樣但我又不想限制按鈕本身的padding或寬度因為這會因為字的多寡而也所限制....
查看完整描述

2 回答

?
明月笑刀无情

TA贡献1828条经验 获得超4个赞

试试:


<button class="add_tab_v2">←</button>

$(".add_tab_v2").on(function(e) {

    setTimeout(function(){

        location.href='xxx.php';

    }, 3000);

    $(this)

        .text('')

        .css('background-image', 'url(images/loading_v2.svg)')

        .prop('disabled', true);

});


查看完整回答
反对 回复 2019-03-28
  • 2 回答
  • 0 关注
  • 442 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号