国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁(yè) > 開(kāi)發(fā) > CSS > 正文

巧用CSS濾鏡制作絢麗圖片播放效果

2024-07-11 08:21:33
字體:
來(lái)源:轉(zhuǎn)載
供稿:網(wǎng)友
    css中有revealtrans濾鏡在網(wǎng)頁(yè)中制作特效非常有用處。這次,我們準(zhǔn)備介紹另一種使用revealtrans濾鏡制作出超弦圖片播放的效果。

  實(shí)現(xiàn)思路:使用revealtrans濾鏡制作出超弦圖片播放的效果,并每張圖片有各自的鏈接地址。

  制作方法:

  1、在<head>中插入js代碼:

<script language=javascript1.2>
function reapply(){
settimeout("slideit()",800)
return true
}
window.onerror=reapply
</script>
<script language=javascript1.1>
<!--
//preload images
var image1=new image()
image1.src=圖片地址"
var image2=new image()
image2.src=圖片地址"
var image3=new image()
image3.src=圖片地址"
var image4=new image()
image4.src=圖片地址"
var image5=new image()
image5.src=圖片地址"
var image6=new image()
image6.src=圖片地址"
var image7=new image()
image7.src=圖片地址"
var image8=new image()
image8.src=圖片地址"
var image9=new image()
image9.src=圖片地址"
//-->
</script>

  其中:images/圖片地址為顯示圖片的路徑,可按實(shí)際情況修改。

  2、在<body>中插入代碼:onload=slideit()

  3、在頁(yè)面中插入圖片。

     
并在圖片<img>中插入:style="filter: revealtrans(duration=2, transition=23)",并命名為:name=slide
  完整代碼:<img src=連接地址"images/圖片地址" width="120" height="90" border="0" style="filter: revealtrans(duration=2, transition=23)" name=slide>

  4、給圖片加超鏈接:<a href="javascript:slidelink()">

  5、加入代碼:
<script>
<!--
////change number of images below 
var number_of_images=9
//change speed below (in seconds)
var speed=3
var step=1
var whichimage=1
function slideit(){
if (!document.images)
return
if (document.all)
slide.filters.item(0).apply()
document.images.slide.src=eval("image"+step+".src")
if (document.all)
slide.filters.item(0).play()
whichimage=step
if (step<number_of_images)
step++
else
step=1
if (document.all)
settimeout("slideit()",speed*1000+3000)
else
settimeout("slideit()",speed*1000)
}
function slidelink(){
if (whichimage==1)
top.location.href=圖片地址"/index.html"
if (whichimage==2)
top.location.href=圖片地址"/news.html" 
if (whichimage==3)
top.location.href=圖片地址"/game.html" 
if (whichimage==4)
top.location.href=圖片地址"/music.html" 
if (whichimage==5)
top.location.href=圖片地址"/sport.html" 
if (whichimage==6)
top.location.href=圖片地址"/radio.html" 
if (whichimage==7)
top.location.href=圖片地址"/travel.html" 
if (whichimage==8)
top.location.href=圖片地址"/card.jsp" 
else if (whichimage==9)
top.location.href=圖片地址"/study.html" 
}
</script>

  其中:各鏈接地址相對(duì)應(yīng)<head>中插入的js代碼中的圖片。

  注意,頁(yè)面地址必須與圖片張數(shù)相對(duì)應(yīng)。
發(fā)表評(píng)論 共有條評(píng)論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 临夏县| 土默特左旗| 遂平县| 银川市| 惠州市| 南昌县| 彭泽县| 宁明县| 蓝田县| 伊通| 深水埗区| 永州市| 汉中市| 醴陵市| 东明县| 屯门区| 平顶山市| 宣城市| 刚察县| 明星| 延津县| 蓝田县| 宣化县| 如东县| 财经| 泗阳县| 丰县| 沅陵县| 集安市| 徐州市| 嵊泗县| 南开区| 呼图壁县| 元江| 湖口县| 兴文县| 三都| 怀来县| 西安市| 武功县| 昭觉县|