【发布时间】:2015-10-06 20:28:15
【问题描述】:
我正在尝试为网站定位一些图片,并且我为图片指定了不同的 ID,因此我可能会以不同的方式定位它们。当我开始定位时,在我的 css 上它不起作用。按 ID 或类别,
我将这些图像放在一个 div 中只是为了检查一切是否正常,并且我想很容易指向我想要使用的确切 img 标签。
代码如下:
<div class="resume">
<a href="#"><img style="height:auto; width:auto; max-width:100px; max-height:100px;"src="imgs/pdf.png" class="pdf" ></a>
<a href="#"><img id="word" style="height:auto; width:auto; max-width:100px; max-height:100px;"src="imgs/mword.png" ></a>
<img id="pline" style="height:auto; width:auto; max-width:100px; max-height:100px;"src="imgs/line1.png" >
<img id="wline" style="height:auto; width:auto; max-width:100px; max-height:100px;"src="imgs/line2.png" >
</div>
.resume img
{
position:relative;
top:100px;
}
.resume img .pdf
{
position: relative;
top:500px;
}
因此,如果有人能在我出错的地方帮助我,我将不胜感激。谢谢!
【问题讨论】: