• CSS & Style Notes


    字符溢出隐藏style

    style="200px;
        overflow: hidden; //溢出部分隐藏
        text-overflow: ellipsis; //溢出部分用省略号代替,可选
        white-space: nowrap; "//不换行,可选

    font简写

    一、字体属性主要包括下面几个

    font-style,font-variant,font-weight,font-size,line-height, font-family,

    font-style(字体样式):normal(正常)、italic(斜体)或oblique(倾斜);

    font-variant(字体变化):normal(正常)或small-caps(小体大写字母);

    font-weight(字体浓淡):normal(正常)或bold(加粗)。有些浏览器甚至支持采用100到900之间的数字(以百为单位);

    font-size(字体大小):可通过多种不同单位(比如像素或百分比等)来设置,如:12px,12pt,120%,1em;

    line-height(文字行高):normal(默认)、<实数>(字体的倍数)、<长度>(px)、<百分比>(字体的百分比)、inherit;

    font-family(字体族):“Arial”、“Times New Roman”、“宋体”、“黑体”等。 

    如果用 font 属性的话,就可以把几个样式进行简化,减少书的情况;font 属性的值应按以下次序书写(各个属性之间用空格隔开):

    顺序:font-style | font-variant | font-weight | font-size | line-height | font-family

    二、font的简写实例

    .font{

    font-style: italic;

    font-variant: small-caps;

    font-weight: bold;

    font-size: 12px;

    line-height: 1.5em;

    font-family: arial,verdana;

    }

    .font {font: italic small-caps bold 12px/1.5em arial,verdana;}

    三、font的简写注意事项

    1、简写时,font-size和line-height只能通过斜杠/组成一个值,不能分开写。

    2、顺序不能改变。这种简写方法只有在同时指定font-size和font-family属性时才起作用。而且,如果你没有设定font-weight, font-style, 以及 font-varient ,他们会使用缺省值

  • 相关阅读:
    论文翻译:2020_DARCN_A Recursive Network with Dynamic Attention for Monaural Speech Enhancement
    论文翻译:2020_demucs_Real Time Speech Enhancement in the Waveform Domain
    论文翻译:2021_A Perceptually Motivated Approach for Lowcomplexity, Realtime Enhancement of Fullband Speech
    tomcat架构分析及配置详解
    深入了解SpringMVC源码解析
    Spring MVC高级应用
    Nginx应用场景配置
    SpringSecurity基础场景应用大全
    SpringBoot基础应用
    Spring MVC应用
  • 原文地址:https://www.cnblogs.com/huhunet/p/7356840.html
Copyright © 2020-2023  润新知