CSSによるフォントサイズの指定方法 font: normal 1.25em/1.5em MuseoSans,sans-serif;


font: normal 1.25em/1.5em MuseoSans,sans-serif;


CSS Shorthand Properties For example, if you needed to style your fonts and you wanted to apply a font-size, line-height, weight, style, and family, you would need to have at least 5 lines of CSS.
p {
  font-size: 1.25em;
  line-height: 1.5em;
  font-weight: bolder;
  font-style: italic;
  font-family: "Times New Roman";
If you use the shorthand font property you can reduce this to one line of CSS.
p {font: bolder italic 1.25em/1.5em "Times New Roman"; }

最初の1.25emがfont-sizeの指定で、後ろの1.5emがline-heightの指定らしいです。 CSSも深いな。


Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.