Html 为什么我可以覆盖'li`';而不是在'P'标签上';什么内容?
在此代码中:Html 为什么我可以覆盖'li`';而不是在'P'标签上';什么内容?,html,css,Html,Css,在此代码中: ... <div class="job-overview no-company-desc"> <h2 class="job-overview-title">Overview</h2> <p>Jamit’s client is looking for a Senior Software Engineer constantly iterating and pushing releases into prod
...
<div class="job-overview no-company-desc">
<h2 class="job-overview-title">Overview</h2>
<p>Jamit’s client is looking for a Senior Software Engineer constantly iterating and pushing releases into production.</p>
<p><strong>Qualifications:</strong></p>
<ul>
<li>Experience leading a team of developers by example – following excellent coding habits and best practices</li>
<li>Experience in an Agile software development environment in a web context</li>
<li>A thorough understanding of how business needs drive product features</li>
<li>Demonstrated expertise with the entire software development life cycle</li>
</ul>
</div>
。。。
概述
贾米特’;s的客户正在寻找一名高级软件工程师,该工程师不断迭代并将发布版本推向生产
资格证书:
- 通过示例领导开发团队的经验–遵循优秀的编码习惯和最佳实践
- 在web环境下的敏捷软件开发环境中的经验
- 全面了解业务需求如何推动产品功能
- 展示了整个软件开发生命周期的专业技能
有各种各样的css样式表包括在内,我试图覆盖他们把我的css代码最后在标题,即
<style type="text/css">
p { color: blue; }
li { color: blue; }
</style>
p{颜色:蓝色;}
li{颜色:蓝色;}
这使得
LI
项目列表为蓝色,而不是p
内容。关于将P
内容也变为蓝色的任何建议?在当前上下文中,这很好-必须有更多更具体的CSS。要么删除该内容,要么更具体一点<代码>!Important将修复此问题,但我不建议使用它
如果无法删除原始样式,请尝试覆盖它div.job-overview.no-company-desc p {
color: blue;
}
或者,更具体地说,您可以使用:(假设p
遵循h2
)
如果特定性不是答案,那么解决方案就是CSS的应用顺序。除此之外,如果您试图覆盖内联样式,则无法覆盖,除非您使用
!重要信息
必须有更多的CSS。。它在这里起作用,尝试使CSS选择器更具体。我尝试了`.job overview no company desc p{color:blue;}`但没有帮助。您需要发布实际重现问题的代码。仅仅说“包含了各种css样式表”就意味着您忽略了问题中的基本信息。
div.job-overview.no-company-desc h2 + p {
color: blue;
}