zoukankan      html  css  js  c++  java
  • css3中比较少用到的属性记录

    letter-spacing 属性

    支持:所有浏览器都支持 letter-spacing 属性。

    letter-spacing 属性增加或减少字符间的空白(字符间距)。

    该属性定义了在文本字符框之间插入多少空间。由于字符字形通常比其字符框要窄,指定长度值时,会调整字母之间通常的间隔。因此,normal 就相当于值为 0。

    注释:允许使用负值,这会让字母之间挤得更紧。

    例子:

    <head>
    <style type="text/css">
    h1 {letter-spacing: -0.5em}
    h4 {letter-spacing: 20px}
    </style>
    </head>
    
    <body>
    <h1>This is header 1</h1>
    <h4>This is header 4</h4>
    </body>
    
    </html>
    

    结果:

     

    word-spacing 属性

    word-spacing 属性增加或减少单词间的空白(即字间隔)。

    该属性定义元素中字之间插入多少空白符。针对这个属性,“字” 定义为由空白符包围的一个字符串。如果指定为长度值,会调整字之间的通常间隔;所以,normal 就等同于设置为 0。允许指定负长度值,这会让字之间挤得更紧。

    注释:允许使用负值。

    <html>
    <head>
    <style type="text/css">
    p.spread {word-spacing: 30px;}
    p.tight {word-spacing: -0.5em;}
    </style>
    </head>
    
    <body>
    <p class="spread">This is some text. This is some text.</p>
    <p class="tight">This is some text. This is some text.</p>
    </body>
    </html>
    

  • 相关阅读:
    ubuntu 构建Xilinx交叉编译环境
    codeSourcery交叉编译环境
    ZYNQ学习之路1. Linux最小系统构建
    静态代码块的执行顺序
    storm maven-shade-plugin
    spring 3.2.7 applicationContext.xml
    ZipUtils
    成员内部类
    jetty jndi数据源
    applicationContext中普通数据源不用jndi数据源
  • 原文地址:https://www.cnblogs.com/waisonlong/p/5035503.html
Copyright © 2011-2022 走看看