• GUI 数字要右对齐,有小数点的要对齐小数点


    https://ux.stackexchange.com/questions/13795/is-there-a-standard-to-left-justify-text-and-right-justify-numeric-values

    简而言之,这样可以对齐数位,易于肉眼比较大小

    English text is usually left-aligned. Numbers are normally aligned so that the various places (unit, tens, etc.) are in columns.

    If the numbers are integers, this just means right-aligning the numbers.

    If they have decimal fractions, then the decimal places should be aligned, with the units digits all in a vertical line.

    This makes it easy to compare the numbers' magnitudes.

    Mac OS X gets this wrong in the Finder: File sizes are given in abbreviated form, such as 342kB or 6MB. When reading a file listing, it's hard to spot the 342MB file amongst all the 342kB files.

    By Bennett McElwee

    Numbers should always be right justified if they're to be compared, especially for cash amounts;

    this keeps the decimal in the same place if the items are rounded the same and makes arithmetic and comparison easy.

    By Ben Brocka

    Numbers should be right-aligned only if their fractional parts are a fixed width (for example, cash amounts probably have a decimal point and 2 fractional digits.).

    But for example, if your list is 2, 14 and 3½ then the numbers should be aligned on the units digit, not right-aligned.

    By Bennett McElwee

  • 相关阅读:
    简单版购物车
    五级菜单
    九九乘法表及金字塔
    day02作业
    解决jar激活pycharm跳窗问题
    1
    第二周
    2019是前十年中最难的一年但极有可能是未来十年来最好的一年
    电脑必备软件之让电脑桌面简洁帅气
    补码一位乘法(五位小数)
  • 原文地址:https://www.cnblogs.com/liujx2019/p/14150167.html
Copyright © 2020-2023  润新知