日期:2014-05-16  浏览次数:21024 次

type="image/x-icon"什么意思啊,
我加了显示在tab中的icon,要是使用<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />这条语句我界面中设置了position:absolute,z-index:1的那些图片和div全都向下移动了,不知道为什么,要是把type="image/x-icon"去掉,设置了position:absolute,z-index:1的那些图片和div都显示正常。
html中红色部分显示位置下移了又几百px:
<div id='product_pic' >
<div id='vconveter' style='float:left;padding:5px;width:302px;height:400px;position:relative'>
  <img width='302' height='400' src='/res/title.png' alt='product' class='home_pf_img' />
<div class='home_pt_div'>FoxVideoConverter</div>
<a href='/software/video/FoxConveter_info.php'><img width='274px' height='251px' src='/res/FoxVideoConverter.png' alt='FoxVideoConverter' class='home_pt_img' /></a>
<div style='z-index:2;position:absolute;top:310px;left:10px;width:280px;height:65px;text-align:center'>
<p class='tenf'>Convert any video format to any one you want,like vcd,dvd,flv,mp4,3gp and so on.</p>
<span style='display:inline-block;width:80px'><a class='nodecoration' href='/software/video/FoxConveter_info.php'>Trail</a></span>
<span style='display:inline-block;width:80px;visibility:hidden'><a class='nodecoration' href='/register/fvc.php'>Buy</a></span>
<span style='display:inline-block;width:110px'><a class='nodecoration' href='/software/video/FoxConveter_info.php'>Learn more>></a></span>
  </div>
</div>
</div>
下面是css:
.home_pf_img{
  z-index:1;
  position:absolute;
  top:0px;
  left:0px
}
.home_pt_div{
  z-index:2;
  position:absolute;
  top:10px;
  left:15px;
  width:274px;
  font-weight:bold;
  text-align:center
}
.home_pt_img{
  cursor:pointer;
  z-index:2;
  position:absolute;
  top:50px;
  left:15px;
  opacity:1.0;
  filter:alpha(opacity=100); /* For IE8 and earlier */
}
.home_pt_img:hover
{
  opacity:0.6;
  filter:alpha(opacity=60); /* For IE8 and earlier */
  .tenf{
  font-size:14px;
}

------解决方案--------------------
你这不是乱来吗,<link rel="shortcut icon" 是用于设置网站收藏夹图标的,普通的图片得使用img标签。
------解决方案--------------------
把图标改了试试