gpt4 book ai didi

html - 如何使段落的第二个元素缩进

转载 作者:行者123 更新时间:2023-11-28 07:29:01 25 4
gpt4 key购买 nike

我附上了这张图片,(01) 作为固定元素放置,而其他元素需要(了解您的期望)在彼此下方适当缩进。 What needs to be fixed

找到附加的我的CSS代码

<div class="col-md-3 verticalLine "><h2><span class="numberCircle">01</span><span><a href="#">Understanding your Expectations</a></span></h2>
<p>We need to fully understand what you want to achieve so we consider all possible solutions.</p>

</div>

我基本上希望 Understanding your expectations 从 01 开始缩进,并将损坏的单词放在句子的第一个单词下方。

谢谢

--CSS---

.sectors-a div h2 {
color: #5FD0FF;
font-size: 21px;
font-weight: normal;
padding-bottom: 20px;
}
.sectors-a div h2 span a {
color: #5FD0FF;
font-size: 20px;
font-weight: bold;
font-style: italic;
font-family: Pathway Gothic, Arial, Helvetica, sans-serif;
/* height: 28px; */
/*
text-indent: 100px;
padding-left: 10px;
*/
padding-left:10px;
padding-bottom: 15px;
}
.sectors-a div h2 span a:hover {
text-decoration: none;
}
.sectors-a div h2 span.numberCircle {
border-radius: 50%;
behavior: url(PIE.htc); /* remove if you don't care about IE8 */

width: 50px;
height: 50px;
padding: 8px;

background: #5FD0FF;
border: 2px solid #5FD0FF;
color: #fff;
text-align: center;
font-weight: 900;
font-family: Pathway Gothic, Arial, Helvetica, sans-serif;
font-size: 25px;
}
.verticalLine {
border-right: 1px solid #727272;
}

.sectors-a {
border-top: 1px solid #ddd;
padding-top: 40px;
margin-top: 40px;
padding-bottom: 40px;
border-bottom: 1px solid #ddd;
background: url('../img/tabsBtmBg.png') repeat;
}
.ie .sectors div h2 a {
font-family: Exo2-ExtraBoldItalic,Arial, Helvetica, sans-serif;
}
.sectors div a {

margin-left: 0;
line-height: 21px;
font-size: 14px;
/* font-family: Pathway Gothic IE, Arial, Helvetica, sans-serif;*/
}

最佳答案

您可以申请 display: table;<h2>包装两个 span 标签并应用 display:table-cell; padding-left: 15px;<span class="numberCircle">01</span>在编号和标题之间留出空格。

这是 CSS 片段:

.col-md-3 {
width:200px;
position:relative;
}
.col-md-3 h2 {
display: table;
}
.numberCircle {
display: table-cell;
padding-right: 15px;
}

https://jsfiddle.net/Le8xvo68/

关于html - 如何使段落的第二个元素缩进,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31648104/

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