gpt4 book ai didi

css - ol li 有左边距,不能左对齐

转载 作者:技术小花猫 更新时间:2023-10-29 11:13:58 24 4
gpt4 key购买 nike

我找到了 ol 的元素有左边距,但是<p>This is first row</p>没有留边距,所以这三行不能左对齐。我怎样才能使它们左对齐?谢谢!

您可以在以下位置查看结果:

或在 Dropbox 中:

https://www.dropbox.com/s/nr4bb00sd80pgl9/Mycss.PNG

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<style type="text/css">
li.A {
list-style-type: decimal;
font-weight: bold;
margin-bottom:15px;
}

li.B{
list-style-type:upper-alpha;
font-weight:normal;
margin-top:4px;
margin-bottom:4px;

}

ol.C {

}
</style>
</head>
<body>
<form id="form1" runat="server">
<div>
<p>This is first row</p>
<ol>
<li class="A">DIY SMS Export V1.05 has been released
<ol class="C">
<li class="B">Add the function to delete sms selected</li>
</ol>
</li>

<li class="A">DIY SMS Export V1.04 has been released
<ol class="C">
<li class="B">Add chinese language support</li>
</ol>
</li>
</ol>
</div>
</form>
</body>
</html>

最佳答案

您是否尝试过添加 css:

ol{ padding-left:0; list-style-position:inside; }

working jsFiddle

关于css - ol li 有左边距,不能左对齐,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17391575/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com