zoukankan      html  css  js  c++  java
  • 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

  • 相关阅读:
    python内置模块collections介绍
    Python的set集合详解
    不同 Python 数据类型的搜寻
    Python 分支、循环、条件与枚举
    ssrf爆破mysql
    php反序列化
    thinkphp历史漏洞
    Thinkphp 缓存RCE
    绕WAF文章收集
    mssql手工盲注
  • 原文地址:https://www.cnblogs.com/liujx2019/p/14150167.html
Copyright © 2011-2022 走看看