zoukankan      html  css  js  c++  java
  • 自动换行后缩进怎么做(CSS)?(可用于 Li y 元素的排版)


    <style type="text/css">
    li{ 100px; border:1px solid #ccc; padding-left:25px; text-indent:-25px;}
    </style>
    </head>
     
    <body>
    <ul>
        <li>我恶魔呢放假额菲菲金额发</li>
        <li>我恶魔呢放假额菲菲金额发</li>
    </ul>
    </body>
    </html>
    原理就是先在左边用padding空开,再用text-indext把第一行收回来

    附:

    参考资料:

    list-style-type的用法

    语法:
    list-style-type : disc | circle | square | decimal | lower-roman | upper-roman | lower-alpha | upper-alpha | none | armenian | cjk-ideographic | georgian | lower-greek | hebrew | hiragana | hiragana-iroha | katakana | katakana-iroha | lower-latin | upper-latin

    取值:
    disc : CSS1 默认值。实心圆
    circle : CSS1 空心圆
    square : CSS1 实心方块
    decimal : CSS1 阿拉伯数字
    lower-roman : CSS1 小写罗马数字
    upper-roman : CSS1 大写罗马数字
    lower-alpha : CSS1 小写英文字母
    upper-alpha : CSS1 大写英文字母
    none : CSS1 不使用项目符号
    armenianl : CSS2 未支持。传统的亚美尼亚数字
    cjk-ideographic : CSS2 未支持。浅白的表意数字
    georgian : CSS2 未支持。传统的乔治数字
    lower-greek : CSS2 未支持。基本的希腊小写字母
    hebrew : CSS2 未支持。传统的希伯莱数字
    hiragana : CSS2 未支持。日文平假名字符
    hiragana-iroha : CSS2 未支持。日文平假名序号
    katakana : CSS2 未支持。日文片假名字符
    katakana-iroha : CSS2 未支持。日文片假名序号
    lower-latin : CSS2 未支持。小写拉丁字母
    upper-latin : CSS2 未支持。大写拉丁字母

  • 相关阅读:
    HDU5418.Victor and World(状压DP)
    POJ2686 Traveling by Stagecoach(状压DP)
    POJ3254Corn Fields(状压DP)
    HDU5407.CRB and Candies(数论)
    CodeForces 352D. Jeff and Furik
    CodeForces 352C. Jeff and Rounding(贪心)
    LightOj 1282 Leading and Trailing
    Ural 1057. Amount of Degrees(数位DP)
    HDU 2089 不要62 (数位DP)
    HDU5366 The mook jong (DP)
  • 原文地址:https://www.cnblogs.com/lxshanye/p/4041182.html
Copyright © 2011-2022 走看看