0

HTML:

  <div class="image"><a href="$ENTRY_URL$" title="$TITLE$ online">
    <img class="avkas rad2" src="$IMG_URL1$" width="130px">
     <img src="/images/star.png" class="img"><div class="text2"> <b> $FILTER1_VALUE$</b>
     </div><div class="text"> <b> $OTHER1$</b>
     </div>
     </a></div> 

CSS

    .image {
 position:relative;
 float:left; /* optional */

}


 .image .img {
 position:absolute;
 top:-13px; /* in conjunction with left property, decides the text position */
 right:-12px;
 width:45px; /* optional, though better have one */}
 .image .text {
 position:absolute;
 top:0px;
 right:1px;
 color: #000; }  
 .image .text2 {
 position:absolute;
 top:3px;
 left:3px;
  color: white; 
   letter-spacing: -1px;  
   background: rgb(0, 0, 0); 
   background: rgba(0, 0, 0, 0.7);}  
.image  a {text-decoration:none;}
.image  a:hover {color:#FF00FF;}

现在我想要这个图像: http : //new-hard.do.am/movie/images/lb-movie-short-poster-hover.png 当用户将鼠标悬停在我的主图像上时,它会像悬停一样..我不想..这张图片替换我的主图片只是出现在这张图片上:

<img class="avkas rad2" src="$IMG_URL1$" width="130px">
4

1 回答 1

0

您需要制作另一个要悬停在此图像上的图像。然后

.image:link
{
background-image: "specify the path of the image";
}

.image:hover
{
background-image: "specify path of the image that you want to hover";
}
于 2013-02-14T21:14:57.563 回答