zoukankan      html  css  js  c++  java
  • Css 字体

    1、text-indent设置抬头距离css缩进


    即对,对应div设置css样式text-indent : 20px; 缩进了20px

    2、letter-spacing 设置字符间距离


    即对对应div设置css属性样式为letter-spacing:8px;,字间距为8px

    3.行间距

    在CSS中,可以设置行间距,格式如下:
    标签名{line-height:参数}

    根据参数不同有3种方法:
    1.用数字参数设置:
       行间距=字号×参数
    2.用单位参数设置:
       行间距=参数
    3.用比例参数设置:
       行间距=字号×参数

    实例:

    1.用数字参数设置:

    <html>
    <style type="text/css">
    <!--
        body{font-size:12pt;line-height:3}
    -->
    </style>
    <head>
         <title>CSS</title>
    </head>
    <body>
         Welcome to Magci's BLOG!<br>
         Welcome to Magci's BLOG!<br>
         Welcome to Magci's BLOG!
    </body>
    </html>

    2.用单位参数设置:

     
    <html>
    <style type="text/css">
    <!--
        body{font-size:12pt;line-height:3pt}
    -->
    </style>
    <head>
         <title>CSS</title>
    </head>
    <body>
         Welcome to Magci's BLOG!<br>
         Welcome to Magci's BLOG!<br>
         Welcome to Magci's BLOG!
    </body>
    </html>

    3.用比例参数设置:

    <html>
    <style type="text/css">
    <!--
        body{font-size:12pt;line-height:200%}
    -->
    </style>
    <head>
         <title>CSS</title>
    </head>
    <body>
         Welcome to Magci's BLOG!<br>
         Welcome to Magci's BLOG!<br>
         Welcome to Magci's BLOG!
    </body>
    </html>

    4.文字竖向排列

    .write_mode {
        1.5em;
        float: right;
    }

  • 相关阅读:
    基于jQuery弹性展开收缩菜单插件gooey.js
    动态插入和移除
    匹配0-59 0-23 的正则表达式
    换行问题
    iOSBug -- The file “Info.plist” couldn’t be opened
    MarkDown语法
    Mac -- 右键添加pages文件
    iOS -- 使用蒲公英进行内测
    Mac使用技巧--如何给safari安装翻译插件
    iOS--优化
  • 原文地址:https://www.cnblogs.com/xcsn/p/3267552.html
Copyright © 2011-2022 走看看