我正在尋找一種方法來控制懸停時特定項目的CSS。由於它不是直接在父系中的元素,我不能使用CSS。通過JavaScript或jQuery控制CSS
<article class="portfolio-item web">
<a data-rel="prettyPhoto" href="http://vimeo.com/34266952">
<img src="http://localhost/wordpress/wp-content/themes/dewuske/images/portfolio/introspection.jpg" alt="">
<span class="genericBeaconIsotope">
<span class="beaconContainer">
<span class="beaconBar"></span>
<span class="beaconCircle1"></span>
<span class="beaconCircle2"></span>
<span class="beaconText">Introspection</span>
</span>
</span>
</a>
</article>
我試圖懸停在beaconContainer上,並且圖像會受到影響。它應該像翻車一樣運作。以下是我試圖在CSS中完成的任務:
-webkit-transform: scale(10);
-moz-transform: scale(10);
-o-transform: scale(10);
-ms-transform: scale(10);
transform: scale(10);
-ms-filter: "progid: DXImageTransform.Microsoft.Alpha(Opacity=0)";
filter: alpha(opacity=0);
opacity:0;
transition: all 1s ease-out 0s;
transition-property: all;
transition-duration: 1s;
transition-timing-function: ease-out;
transition-delay: 0s;
}
我該如何去做這件事?我對JavaScript或jQuery知之甚少,或者知道如何從它們調用事件,特別是像這樣。謝謝
只適用於jQuery庫。你應該提到這一點。 – vol7ron
非常好的一點,我會補充說明。 –