Html 没有其他元素会以彩色背景显示在my section元素中
我已经创建了一个背景色为Html 没有其他元素会以彩色背景显示在my section元素中,html,css,Html,Css,我已经创建了一个背景色为#ff6952 我希望我能放置一张名为LookOut software的软件业务时间表的图像(以草图形式创建) 我很难在中的背景色上显示任何内容。我尝试在部分中插入一个img标记,但图像没有显示出来。然后,我尝试使用无序列表重新创建时间线,而不使用列表样式,列表元素像导航菜单一样内联显示。似乎什么也没出现。请注意,时间线应该是白色的 以下是HTML: <section id="timeline"> <ul> <li&g
#ff6952
我希望我能放置一张名为LookOut software的软件业务时间表的图像(以草图形式创建) 我很难在
中的背景色上显示任何内容。我尝试在部分中插入一个img
标记,但图像没有显示出来。然后,我尝试使用无序列表重新创建时间线,而不使用列表样式,列表元素像导航菜单一样内联显示。似乎什么也没出现。请注意,时间线应该是白色的
以下是HTML:
<section id="timeline">
<ul>
<li>
1994 - Client Connect Plus is founded.
</li>
<li>
1997 - Client Connect Plus becomes LookOut Software.
</li>
<li>
2001 - We launched our first product. Lots of anticipation.
</li>
<li>
2006 - Big success with new product. Everybody smiles.
</li>
<li>
2010 - We had some tough times but we survived them.
</li>
<li>
2013 - Things started looking better. Brighter days.
</li>
<li>
2015 - SharePoint CRM Template becomes SharePoint Flex.
</li>
<li>
2016 - ?
</li>
</ul>
</section>
我尝试了许多不同的css样式,我认为在这里列出所有这些都是徒劳的。非常感谢您的帮助。使用此片段在颜色上方显示您的图像:
background-image:url(http://www.wwwsitus.com/support/img/ampproject.png);
background-position:center;
background-repeat:no-repeat;
并将其放置在您的时间线中,如下所示:
#timeline{
height: 700px;
width: 100%;
background: #ff6952;
/*start: adding image*/
background-image:url(http://www.wwwsitus.com/support/img/ampproject.png);
background-position:center;
background-repeat:no-repeat;
/*end: adding image*/
}
检查JSFIDLE。
顺便说一句,我使用图像位置作为中心
。您可以为其设置自由(中间
,右边
,左边
或底部
)。这是您仅有的HTML吗?否则,请尽可能多地发布,最好使用JSFIDLE或类似的方式。您的代码中没有错误,并且呈现得很好:很高兴我能提供帮助。快乐编码^_^
#timeline{
height: 700px;
width: 100%;
background: #ff6952;
/*start: adding image*/
background-image:url(http://www.wwwsitus.com/support/img/ampproject.png);
background-position:center;
background-repeat:no-repeat;
/*end: adding image*/
}