我需要制作一个网页,我的图片上方有9个链接 有了这个background我正在使用,我打算让它响应,以及每个灰色圆圈上方的链接。
想象一下以下链接'处理:
我想我可以使用3个不同的 div 元素,例如,包含一个元素的元素将具有宽度:100%,包含两个元素的宽度为50%,包含三个元素的元素的宽度为:33%。
所有这一切,都在主div元素中,背景图像和固定的宽度和高度(与图像的大小相同)。
当前HTML
<div class="list-part">
<ul>
<li id="w1"><a href="~/parceiros.cshtml">Parceiros</a></li>
<li id="w2"><a href="~/phc-cs.cshtml">PHC CS</a></li>
<li id="w2"><a href="~/phc-fx.cshtml">PHC FX</a></li>
<li id="w3"><a href="~/consultoria.cshtml">Consultoria</a></li>
<li id="w3"><a href="~/suporte.cshtml">Suporte</a></li>
<li id="w3"><a href="~/desenv.cshtml">Desenvolvimento</a></li>
<li id="w2"><a href="~/formacao.cshtml">Formação</a></li>
<li id="w2"><a href="~/soltec.cshtml">Soltec</a></li>
<li id="w1"><a href="~/financiamento.cshtml">Financiamento</a></li>
</ul>
</div>
当前CSS
.list-part {
margin-top: 100px;
width: 672px;
height: 667px;
background: url(../media/solucoes_logo.jpg) no-repeat center;
background-size: contain;
}
.list-part ul {
width: 100%;
padding: 0;
}
.list-part ul li {
list-style: none;
}
.list-part ul li a {
color: red;
text-decoration: none;
}
.list-part ul li a:hover {
color: red;
}
#w1 {
width: 100%;
height: 133px;
}
#w2 {
width: 48%;
height: 133px;
display: inline-block;
}
#w3 {
width: 33%;
height: 133px;
display: inline-block;
}
如何按照背景图像的响应性处理图像显示的链接?