gpt4 book ai didi

html - 如果数字或 li 元素为奇数,我如何使 li 元素处于同一级别

转载 作者:太空宇宙 更新时间:2023-11-03 22:41:13 26 4
gpt4 key购买 nike

我希望左边的 li 元素与右边的 li 元素处于同一水平,这里是代码:https://jsfiddle.net/v5m6cv1u/

   <div class="menu">
</p>Code too long<p>
</div>

最佳答案

.menu h2 {
text-align: center;
font-size: 4vh;
text-transform: uppercase;
}

.menu h3 {
font-size: 3vh;
color: darkblue
}

.menu h4 {
padding: 0.2em 0em;
}

.menu .content {
padding: 3em 5em;
}

.ipsum {
list-style: none;
padding-bottom: 1em;
border-bottom: 1px solid #000000;
}

.menu p {
font-size: 1em;
}

.menu .vitae {
text-align: right;
color: brown
}

.meniu .vitae:after {
content: " VIT";
}

.menu .magna {
text-align: right;
color: darkslateblue;
font-size: 1.2em;
}

.menu .magna:after {
content: " MAG";
}

.menu ul {
columns: 2;
padding: 0;
margin: 0;
display: inline-block;
width: 100%;
}

.menu ul li {
display: inline-block;
}

.menu {
background-color: #FFFAE7;
}

.menu h1 {
color: #d00807;
font-size: 6em;
display: block;
text-align: center;
padding-top: 0.2em;
padding-bottom: 0.1em;
text-transform: uppercase;
}
<div class="menu">
<h1>Lorem ipsum</h1>
<h2>Lorem ipsum dolor sit amet, et denique molestiae sit. </h2>
<div class="content">
<h3>Lorem</h3>
<ul>
<li class="ipsum dolor">
<h4>Dolor</h4>
<p>Nullam consequat, sem vitae rhoncus tristique, mauris nulla fermentum est, bibendum ullamcorper sapien magna et quam.</p>
<div class="vitae">9.5</div>
<div class="magna">320</div>
</li>
<li class="ipsum sit">
<h4>Sit</h4>
<p>Nullam consequat, sem vitae rhoncus tristique, mauris nulla fermentum est, bibendum ullamcorper sapien magna et quam.</p>
<div class="vitae">9.5</div>
<div class="magna">320</div>
</li>
<li class="ipsum amet">
<h4>Amet</h4>
<p>Nullam consequat, sem vitae rhoncus tristique, mauris nulla fermentum est, bibendum ullamcorper sapien magna et quam.</p>
<div class="vitae">9.5</div>
<div class="magna">320</div>
</li>
</ul>
</div>
</div>

关于html - 如果数字或 li 元素为奇数,我如何使 li 元素处于同一级别,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43892930/

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