2014-12-18 4 views
-3

HTML, CSS 및 Jquery를 사용하고 있고 시계 이미지로 이미지 호버 효과를 사용했으며 여러 이미지를 세로로 가운데에 배치하여 같은 이미지와 효과를 추가하고 싶습니다. 그러나 그것은 나에게시키지 않는다, 여기에서 문제의 사이트가있다! 어떤 도움이 될거야!HTML 이미지 세로 맞춤

<div id="header"> 
    <h1></h1> 
</div> 
<div class="center12"> 
    <img src="image/logocenter1.png" alt="** PLEASE DESCRIBE THIS IMAGE **"> 
</div> 
<div id="nav"> 
    <h2> 
     <a href="index.html" class="rollover">Home</a>/<a href="style.html" class="rollover">Styles & Sizes</a>/
     <a href="brand.html" class="rollover">Brands & Prices</a>/
     <a href="strap.html" class="rollover">Watch Straps</a>/<a href="used.html" class="rollover">Tips on buying used</a> 
    </h2> 
</div> 
<div class="fadehover"> 
    <img src="image/test1.png" alt="" class="a"> <img src="image/test1bw.png" alt="" class="b"> 
</div> 

마치 간단해야하지만 작동하지 않습니다.

+1

여기서 수행하려는 작업을 이해할 수 없으며 하나의 이미지 영역 만 있고 수직으로 정렬하려고하는 것은 무엇입니까? – PavKR

+0

다른 이미지를 계속해서 반복해서 넣을 수 있고 동일한 효과를 낼 수 있기를 원합니다.

zzaapp

+0

자, 사용중인 JS는 어디에 있습니까? – PavKR

답변

0
Instead of using jquery and two images for gray scale effect, use the following: 

By adding an css you can bring the same effect using a single image(no need of jquery and hover image). 

Add this css: 

<pre> 
img.a:hover { 
    filter: url(""); 
    } 
</pre> 

and remove the jquery and another gray scale image. If you don't want hover effect and the images are needs to be shown one by one down, remove one of the images inside the div and put it into a separate Div' 
+0

나는 그것의 클래스 프로젝트를 원할 것이고 그것은 사이트에서 jquery를 가질 필요가있다. – zzaapp

+0

호버 (hover) 효과가있는 이미지를 하나씩 내려 보시겠습니까? 또는 여러 이미지 뒤에? –

+0

아래와 같이 jquery를 사용하여 단일 이미지로이 작업을 수행 할 수 있습니다. –