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

  • 相关阅读:
    编译安装 openmcu
    spring AOP
    spring 依赖注入
    maven项目无法新增java test目录的问题
    java 路径的问题
    使用httpClient模拟http请求
    java String 内存模型
    javaweb项目中的过滤器的使用
    javaweb+spring 项目集成异常的处理
    javaweb 项目的异常处理
  • 原文地址:https://www.cnblogs.com/liujx2019/p/14150167.html
Copyright © 2011-2022 走看看