What is the value of the css 'ex' unit?

后端 未结 5 893
时光说笑
时光说笑 2020-11-28 03:21

(Not to be confused with Xunit, a popular .Net unit testing library.)

Today in a fit of boredom I started inspecting Gmails DOM (yes, I was very bored).

Ever

5条回答
  •  庸人自扰
    2020-11-28 03:37

    Another thing to consider here is how your page scales when a user ups or downs their font size (perhaps using ctrl+mouse wheel (windows)).

    I have used em with.. padding-left: 2 em; padding-right: 2 em;

    and ex with padding-bottom: 2 ex; padding-top: 2 ex;

    Thus using a vertical unit of measure for a vertically scaling property and a horizontal unit of measure for a horizontally scaling property.

提交回复
热议问题