yantianqi
V2EX  ›  问与答

jquery 获取宽度,带小数点

  •  
  •   yantianqi · Sep 27, 2016 · 2091 views
    This topic created in 3557 days ago, the information mentioned may be changed or developed.
    html:<div class="div1" style="width:22.5px;">div</div>
    jq:$(".div1").width();//获取结果是四舍五入?怎么获取到 22.5
    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2961 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 14:58 · PVG 22:58 · LAX 07:58 · JFK 10:58
    ♥ Do have faith in what you're doing.