V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
shpasspass
V2EX  ›  问与答

关于 list-style-type 中的 square 和 decimal 怎样才可以对齐?

  •  
  •   shpasspass · Apr 16, 2014 · 3095 views
    This topic created in 4400 days ago, the information mentioned may be changed or developed.
    如图,
    css是↓
    .zhenwen ul,.zhenwen ol{
    padding-left: 30px;
    margin: 15px 0 15px 0;
    }
    .zhenwen ul li
    {
    margin-bottom: 7px;
    padding-bottom: 7px;
    border-bottom: 1px dashed #dfdfdf;
    list-style-type: square;
    }
    .zhenwen ol li{
    margin-bottom: 7px;
    padding-bottom: 7px;
    border-bottom: 1px dashed #dfdfdf;
    list-style-type: decimal;
    }
    html是↓
    <div class="zhenwen">
    <ul>
    <li>键盘 W S A D 分别控制上下左右</li>
    <li>空白键跳跃</li>
    <li>左 SHIFT 键加速</li>
    <li>鼠标控制传送枪的方向</li>
    <li>鼠标左键发射传送门 </li> </ul>
    <ol>
    <li>键盘 W S A D 分别控制上下左右</li>
    <li>空白键跳跃</li>
    <li>左 SHIFT 键加速</li>
    <li>鼠标控制传送枪的方向</li>
    <li>鼠标左键发射传送门 </li>
    </ol>
    </div>


    弄完之后,数字总是靠左边。。。有没有办法与圆点对齐呢?
    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   825 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 20:13 · PVG 04:13 · LAX 13:13 · JFK 16:13
    ♥ Do have faith in what you're doing.