zoukankan      html  css  js  c++  java
  • CSS 悬挂缩进

    每个段落首行不缩进,其余各行都缩进一定距离的技术

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>悬挂缩进</title>
    <style type="text/css">
    p
    {
    width
    : 200px;
    padding-left
    : 2em;
    }
    p:first-letter
    {
    margin-left
    : -2em;
    }
    </style>
    </head>
    <body>
    <h4>悬挂缩进</h4>
    <p> The length of the first line depends on a number of factors, such as the width of the page and the font size.</p>
    <p> The :first-line pseudo-element can be attached to block-level elements. It can be attached to inline elements if you set the corresponding display property to block.</p>
    </body>
    </html>

  • 相关阅读:
    Aizu
    Aizu
    POJ
    POJ
    POJ
    UVA
    manacher
    Gym
    Gym
    Gym
  • 原文地址:https://www.cnblogs.com/ShepherdIsland/p/1812499.html
Copyright © 2011-2022 走看看