我尝试了所有在网络上找到的解决方案来使这个div盒子覆盖在图片之上。
我们有一个背景图片,如下图所示,有四个单词Eversoft、TruSoft、Solarmax和Active Family。
这四个单词需要移动到图片上的盒子中,但我无法正确使用CSS,这是我的页面结构。
我们有一个背景图片,如下图所示,有四个单词Eversoft、TruSoft、Solarmax和Active Family。
这四个单词需要移动到图片上的盒子中,但我无法正确使用CSS,这是我的页面结构。
<div class="row">
<img src="~/Content/Images/Mobile-BackGround-new-2.png" class="img-responsive" style="position: relative" />
<div id="stainMasterLinksContainer">
<div id="stainMasterLinksTop">
<a href='@Url.Action("Eversoft", "Eversoft")' style="color: #934991;" class="GothamFont" id="Eversoft"><b>EverSoft</b> <small><sup>®</sup></small></a>
<a href='@Url.Action("Trusoft", "Trusoft")' style="color: #f7acb7" class="GothamFont"><b>TruSoft</b> <small><sup>®</sup></small></a>
</div>
<div id="stainMasterLinksBottom">
<a href='@Url.Action("Solarmax", "Solarmax")' style="color: #ffe600" class="GothamFont" id="Solarmax"><b>SolarMax</b> <small><sup>®</sup></small></a>
<a href='@Url.Action("ActiveFamily", "ActiveFamily")' style="color: #dc1e33" class="GothamFont" id="ActiveFamily"><b>Active Family</b> <small><sup>™</sup></small></a>
</div>
</div>
我目前正在使用这个CSS样式表来设置stainMasterLinksContainer
#stainMasterLinksContainer {
padding-top: -40%;
font-size: 15.5px;
position: relative;
z-index: 100;
}
非常感谢您的帮助。
padding
不能为负数,请使用margin
代替。 - Marcelo