0
我使用下面的代碼從我網站上的鏈接創建圖庫。我知道沒有完全保護圖像,但想要在圖像上添加透明覆蓋圖。我可以看到通過將圖像放在div標籤中並使用css來完成此操作的方法,但我不確定它適用於我正在使用的javascript。javascript庫中的透明疊加圖
有沒有人有添加覆蓋到JavaScript的手段?
<script type="text/javascript">
var mygallery=new simpleGallery({
wrapperid: "simplegallery1", //ID of main gallery container,
dimensions: [250, 180], //width/height of gallery in pixels. Should reflect dimensions of the images exactly
imagearray: [
["gallery/img1.png", "", "_new", "© me"],
["gallery/img2.png", "", "_new", "© me"],
["gallery/img3.png", "", "_new", "© me"],
],
autoplay: [true, 2500, 2], //[auto_play_boolean, delay_btw_slide_millisec, cycles_before_stopping_int]
persist: false, //remember last viewed slide and recall within same session?
fadeduration: 500, //transition duration (milliseconds)
oninit:function(){ //event that fires when gallery has initialized/ ready to run
//Keyword "this": references current gallery instance (ie: try this.navigate("play/pause"))
},
onslide:function(curslide, i){ //event that fires after each slide is shown
//Keyword "this": references current gallery instance
//curslide: returns DOM reference to current slide's DIV (ie: try alert(curslide.innerHTML)
//i: integer reflecting current image within collection being shown (0=1st image, 1=2nd etc)
}
})
</script>