gpt4 book ai didi

html - 我该如何整理这个CSS

转载 作者:行者123 更新时间:2023-11-28 11:16:37 27 4
gpt4 key购买 nike

我有一个代码,一切看起来都很好,但呈现的前端却不是。我有四个总宽度为1000px的盒子,每个盒子向左浮动250px,但是显示的页面显示div宽度超过1000px,我不知道ish在哪里,请在下面找到html代码和css那个地区:

<div class="strategy">
<div class="strat">
<p>To ensure our clients get the best results, we employ a strategy which takes time to create the best possible combination of ideas beyond just a random collection of texts and images.</p>
</div>
</div>
<div class="strategy">
<div class="design">
<h2>Design</h2>
<p>We plan and strategize your project through even before starting it. An evaluation meeting is scheduled with you to get a chance to understand what your requirements are. We analyze, review and discuss with you on various options for your project. This will guide our brainstorming, research and gathering of content for designing the best solution for you.
</p>
</div>
</div>
<div class="strategy">
<div class="develop">
<h2>Develop</h2>
<p>Based on the deliverables from the design step, we set to work harnessing our talents and appropriate technologies available to execute the project with focus on quality, cost and time. The client is carried along and kept in the loop at each stage for design approvals through our Online Project Sneak-Peek Platform (PSP Platform). This allows you to keep track of changes and updates into ensuring that the project, no matter how small or large, is a complete success.
</p>
</div>
</div>
<div class="strategy">
<div class="deploy">
<h2>Deploy</h2>
<p>Finally your project is ready for deployment. This is in two phases; first phase in which we deploy project for debugging and troubleshooting for errors and glitches. When this phase has been certified then we move to the second phase which is the final deployment of the project and handover.
</p>
</div>
</div>
<div class="clear"></div>

它的CSS是:

#about{
width:100%;
}

#about .about{
width:1000px;
margin:auto;
text-align:justify;
border-bottom:solid #000 1px;
padding:0 0 20px 0;
}

.about h1 {
width:1000px;
margin:auto;
text-align:left;
padding:50px 0;
font-size:40px;
font-weight:normal;
border-bottom:solid #000 1px;
}

.about h2 {
width:1000px;
margin:auto;
text-align:left;
padding:20px 0;
font-size:25px;
font-weight:normal;
}

.about p{
font-size:14px;
}

.about .strategy{
width:25%;
float:left;
text-align:left;
color:#fff;
}

.about .strat{
background:#33bbec;
padding:90px 20px 0 20px;
height:370px;
}

.about .design{
background:#5a5a5a;
padding:15px 20px;
height:430px;
}

.about .develop{
background:#4a4a4a;
padding:15px 20px;
height:430px;
}

.about .deploy{
background:#3e3e3e;
padding:15px 20px;
height:430px;
}

最佳答案

为什么要嵌套 div?在您的 CSS 中,您将标题样式设置为 1000 像素?老兄,那不对……你的代码一团糟……设计 DIV CLASS 样式……而不是标题……

关于html - 我该如何整理这个CSS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21728530/

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