免费视频淫片aa毛片_日韩高清在线亚洲专区vr_日韩大片免费观看视频播放_亚洲欧美国产精品完整版

打開(kāi)APP
userphoto
未登錄

開(kāi)通VIP,暢享免費(fèi)電子書(shū)等14項(xiàng)超值服

開(kāi)通VIP
很不錯(cuò)的特效代碼---【一】
新  客  小  草  歡  迎  你
新客小草歡迎您
[1];向上下左右滾動(dòng)圖片的特效
實(shí)用的特效,圖片自動(dòng)向上、向下、向左或向右滾動(dòng),鼠標(biāo)移動(dòng)上圖片時(shí)就停止,很多網(wǎng)站的滾動(dòng)圖片新聞和友情鏈接就是用的這種方法。
<!--下面是向上滾動(dòng)代碼-->
<div id=butong_net_top style=overflow:hidden;height:100;width:90;>
<div id=butong_net_top1>
<img src="
<img src="
<img src="
<img src="
<img src="<img src="<img src="<img src="<img src="</div>
<div id=butong_net_top2></div>
</div>
<script>
var speed=30
butong_net_top2.innerHTML=butong_net_top1.innerHTML //克隆butong_net_top1為butong_net_top2
function Marquee1(){
//當(dāng)滾動(dòng)至butong_net_top1與butong_net_top2交界時(shí)
if(butong_net_top2.offsetTop-butong_net_top.scrollTop<=0)
butong_net_top.scrollTop-=butong_net_top1.offsetHeight //butong_net_top跳到最頂端
else{
butong_net_top.scrollTop++;
}
}
var MyMar1=setInterval(Marquee1,speed)//設(shè)置定時(shí)器
//鼠標(biāo)移上時(shí)清除定時(shí)器達(dá)到滾動(dòng)停止的目的
butong_net_top.onmouseover=function() {clearInterval(MyMar1)}
//鼠標(biāo)移開(kāi)時(shí)重設(shè)定時(shí)器
butong_net_top.onmouseout=function(){MyMar1=setInterval(Marquee1,speed)}
</script>
<!--向上滾動(dòng)代碼結(jié)束-->
<br>
<!--下面是向下滾動(dòng)代碼-->
<div id=butong_net_bottom style=overflow:hidden;height:100;width:90;>
<div id=butong_net_bottom1>
<img src="
<img src="<img src="<img src="<img src="<img src="<img src="<img src="<img src="</div>
<div id=butong_net_bottom2></div>
</div>
<script>
var speed=30
butong_net_bottom2.innerHTML=butong_net_bottom1.innerHTML
butong_net_bottom.scrollTop=butong_net_bottom.scrollHeight
function Marquee2(){
if(butong_net_bottom1.offsetTop-butong_net_bottom.scrollTop>=0)
butong_net_bottom.scrollTop+=butong_net_bottom2.offsetHeight
else{
butong_net_bottom.scrollTop--
}
}
var MyMar2=setInterval(Marquee2,speed)
butong_net_bottom.onmouseover=function() {clearInterval(MyMar2)}
butong_net_bottom.onmouseout=function() {MyMar2=setInterval(Marquee2,speed)}
</script>
<!--向下滾動(dòng)代碼結(jié)束-->
<br>
<!--下面是向左滾動(dòng)代碼-->
<div id="butong_net_left" style="overflow:hidden;width:500px;">
<table cellpadding="0" cellspacing="0" border="0">
<tr><td id="butong_net_left1" valign="top" align="center">
<table cellpadding="2" cellspacing="0" border="0">
<tr align="center">
<td><img src="
>
<td><img src="
>
<td><img src="
>
<td><img src="
>
<td><img src="
src="<td><img src=">
</tr>
</table>
</td>
<td id="butong_net_left2" valign="top"></td>
</tr>
</table>
</div>
<script>
var speed=30//速度數(shù)值越大速度越慢
butong_net_left2.innerHTML=butong_net_left1.innerHTML
function Marquee3(){
if(butong_net_left2.offsetWidth-butong_net_left.scrollLeft<=0)
butong_net_left.scrollLeft-=butong_net_left1.offsetWidth
else{
butong_net_left.scrollLeft++
}
}
var MyMar3=setInterval(Marquee3,speed)
butong_net_left.onmouseover=function() {clearInterval(MyMar3)}
butong_net_left.onmouseout=function() {MyMar3=setInterval(Marquee3,speed)}
</script>
<!--向左滾動(dòng)代碼結(jié)束-->
<br>
<!--下面是向右滾動(dòng)代碼-->
<div id="butong_net_right" style="overflow:hidden;width:500px;">
<table cellpadding="0" cellspacing="0" border="0">
<tr><td id="butong_net_right1" valign="top" align="center">
<table cellpadding="2" cellspacing="0" border="0">
<tr align="center">
<td><img src="
>
<td><img src="
>
<td><img src="
>
<td><img src="
>
<td><img src="
>
</tr>
</table>
</td>
<td id="butong_net_right2" valign="top"></td>
</tr>
</table>
</div>
<script>
var speed=30//速度數(shù)值越大速度越慢
butong_net_right2.innerHTML=butong_net_right1.innerHTML
function Marquee4(){
if(butong_net_right.scrollLeft<=0)
butong_net_right.scrollLeft+=butong_net_right2.offsetWidth
else{
butong_net_right.scrollLeft--
}
}
var MyMar4=setInterval(Marquee4,speed)
butong_net_right.onmouseover=function() {clearInterval(MyMar4)}
butong_net_right.onmouseout=function() {MyMar4=setInterval(Marquee4,speed)}
</script>
<!--向右滾動(dòng)代碼結(jié)束-->
使用說(shuō)明:上面代碼中包含向上、下、左、右四個(gè)方向滾動(dòng)圖片的四段代碼,可按代碼中的注釋選擇你需要代碼,然后將其余代碼刪除,代碼中的"width"和"height"的值為滾動(dòng)圖片區(qū)的寬和高,代碼中的<img src="http://www.96pc.com/texiao/images/logo88.gif">為依次滾動(dòng)的圖片,只需將src的值改為你的圖片地址即可,當(dāng)然你也可以為圖片加上鏈接,如:<a target="_blank"><img src="http://www.96pc.com/texiao/images/logo88.gif"></a>,代碼中var speed的值為圖片滾動(dòng)的速度,可以根據(jù)你的需要更改。(注:特效中圖片滾動(dòng)區(qū)的高度(向上和向下滾動(dòng)圖片)或?qū)挾?向左和向右滾動(dòng)圖片)必須比全部滾動(dòng)圖片的總高度或?qū)挾刃?,否則圖片滾動(dòng)會(huì)出現(xiàn)問(wèn)題。)
[2];
給圖片添加圖片的倒影
一個(gè)不錯(cuò)的圖片特效,為圖片加上圖片的倒影,可以用于網(wǎng)頁(yè)上的任何圖片。
<SCRIPT LANGUAGE="JavaScript">
<!--
document.getElementsByClassName = function(className) {
var children = document.getElementsByTagName('*') || document.all;
var elements = new Array();
for (var i = 0; i < children.length; i++) {
var child = children[i];
var classNames = child.className.split(' ');
for (var j = 0; j < classNames.length; j++) {
if (classNames[j] == className) {
elements.push(child);
break;
}
}
}
return elements;
}
var Reflection = {
defaultHeight : 0.5,
defaultOpacity: 0.5,
add: function(image, options) {
Reflection.remove(image);
doptions = { "height" : Reflection.defaultHeight, "opacity" : Reflection.defaultOpacity }
if (options) {
for (var i in doptions) {
if (!options[i]) {
options[i] = doptions[i];
}
}
} else {
options = doptions;
}
try {
var d = document.createElement('div');
var p = image;
var classes = p.className.split(' ');
var newClasses = '';
for (j=0;j<classes.length;j++) {
if (classes[j] != "reflect") {
if (newClasses) {
newClasses += ' '
}
newClasses += classes[j];
}
}
var reflectionHeight = Math.floor(p.height*options['height']);
var divHeight = Math.floor(p.height*(1+options['height']));
var reflectionWidth = p.width;
/* Copy original image's classes & styles to div */
d.className = newClasses;
p.className = 'reflected';
d.style.cssText = p.style.cssText;
p.style.cssText = ' ';
if (document.all && !window.opera) {
var reflection = document.createElement('img');
reflection.src = p.src;
reflection.style.width = reflectionWidth+'px';
reflection.style.marginBottom = "-"+(p.height-reflectionHeight)+'px';
reflection.style.filter = 'flipv progid:DXImageTransform.Microsoft.Alpha(opacity='+(options['opacity']*100)+', style=1, finishOpacity=0, startx=0, starty=0, finishx=0, finishy='+(options['height']*100)+')';
d.style.width = reflectionWidth+'px';
d.style.height = divHeight+'px';
p.parentNode.replaceChild(d, p);
d.appendChild(p);
d.appendChild(reflection);
} else {
var canvas = document.createElement('canvas');
var context = canvas.getContext("2d");
canvas.style.height = reflectionHeight+'px';
canvas.style.width = reflectionWidth+'px';
canvas.height = reflectionHeight;
canvas.width = reflectionWidth;
d.style.width = reflectionWidth+'px';
d.style.height = divHeight+'px';
p.parentNode.replaceChild(d, p);
d.appendChild(p);
d.appendChild(canvas);
context.save();
context.translate(0,image.height-1);
context.scale(1,-1);
context.drawImage(image, 0, 0, reflectionWidth, image.height);
context.restore();
context.globalCompositeOperation = "destination-out";
var gradient = context.createLinearGradient(0, 0, 0, reflectionHeight);
gradient.addColorStop(1, "rgba(255, 255, 255, 1.0)");
gradient.addColorStop(0, "rgba(255, 255, 255, "+(1-options['opacity'])+")");
context.fillStyle = gradient;
if (navigator.appVersion.indexOf('WebKit') != -1) {
context.fill();
} else {
context.fillRect(0, 0, reflectionWidth, reflectionHeight*2);
}
}
} catch (e) {
}
},
remove : function(image) {
if (image.className == "reflected") {
image.className = image.parentNode.className;
image.parentNode.parentNode.replaceChild(image, image.parentNode);
}
}
}
function addReflections() {
var rimages = document.getElementsByClassName('reflect');
for (i=0;i<rimages.length;i++) {
var rheight = null;
var ropacity = null;
var classes = rimages[i].className.split(' ');
for (j=0;j<classes.length;j++) {
if (classes[j].indexOf("rheight") == 0) {
var rheight = classes[j].substring(7)/100;
} else if (classes[j].indexOf("ropacity") == 0) {
var ropacity = classes[j].substring(8)/100;
}
}
Reflection.add(rimages[i], { height: rheight, opacity : ropacity});
}
}
var previousOnload = window.onload;
window.onload = function () { if(previousOnload) previousOnload(); addReflections(); }
//-->
</SCRIPT>
使用說(shuō)明:把此特效<head></head>區(qū)的代碼加入網(wǎng)頁(yè)的<head></head>區(qū),然后只需在你網(wǎng)頁(yè)上所插入圖片的<img>代碼中加入class="reflect"就可以為該圖片添加圖片的倒影,如:插入圖片的代碼為<img src="butong_net.jpg">,那就修改為<img class="reflect" src="butong_net.jpg">
把如下代碼復(fù)制到<body>與</body>之間
<img class="reflect" src="butong_net.jpg">
[3];小方框中瀏覽大圖
如果圖片放在網(wǎng)頁(yè)上覺(jué)得很大,又不想壓縮圖片的尺寸,使用此特效是個(gè)不錯(cuò)的方法,可以將圖片放在自定大小的框中,實(shí)時(shí)隨鼠標(biāo)移動(dòng)而移動(dòng)。
<style type="text/css">
<!--
#pic {
width:480px;
height:320px;
border: 3px solid #ccc;
background-image: url(images/butong_net.jpg);
background-repeat: no-repeat;
background-position: 0px 0px;
cursor: move;
}
-->
</style>
<script type="text/javascript">
<!--
var p = new Array();
var speed = 0.05;  //速度
var picWidth = 1280;  // 大圖的寬高
var picHeight = 971;
var x,y // 鼠標(biāo)點(diǎn)下去時(shí)背景的坐標(biāo)
var x_new,y_new  //位移
var haveclick = false;
function getmouseposition(event)
{
if(document.all)
{
x = document.body.scrollLeft+event.clientX;
y = document.body.scrollTop+event.clientY;
}else
{
x = event.layerX;
y = event.layerY;
}
haveclick = true;
}
function movestop()
{
haveclick = false;
}
function movestart(event)
{
if(haveclick)
{
if(document.getElementById('pic').style.backgroundPosition.length==0)
{document.getElementById('pic').style.backgroundPosition="0px 0px";}
p = document.getElementById('pic').style.backgroundPosition.split(" ")
if(document.all)
{
x_new = document.body.scrollLeft+event.clientX;
y_new = document.body.scrollTop+event.clientY;
}else
{
x_new = event.layerX;
y_new = event.layerY;
}
x2 = (speed*(x_new-x)+parseInt(p[0])).toString(10);    // 計(jì)算位移量
y2 = (speed*(y_new-y)+parseInt(p[1])).toString(10);
if (x2<-picWidth+420) x2=-picWidth+420;
if (y2>0) y2=0;
if (x2>0) x2=0;
if (y2<-picHeight+300) y2=-picHeight+300;
document.getElementById('pic').style.backgroundPosition=x2+"px "+y2+"px";
}
}
-->
</script>
把如下代碼復(fù)制到<body>與</body>之間
<div id="pic" onmousedown="getmouseposition(event)" onmousemove="movestart(event)" onmouseup="movestop()" onmouseout="movestop()"> </div>
                           謝謝欣賞!更多精彩期待光臨!請(qǐng)點(diǎn)擊進(jìn)入 
 
           
         
本站僅提供存儲(chǔ)服務(wù),所有內(nèi)容均由用戶(hù)發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)點(diǎn)擊舉報(bào)
打開(kāi)APP,閱讀全文并永久保存 查看更多類(lèi)似文章
猜你喜歡
類(lèi)似文章
文字列表無(wú)縫向上滾動(dòng)JavaScript代碼
滾動(dòng)marquee的詳細(xì)用法
阿里頁(yè)面常見(jiàn)問(wèn)題及解決方案
png透明解決辦法
選項(xiàng)卡
通過(guò)js做出一個(gè)煙花效果(詳細(xì)步驟)
更多類(lèi)似文章 >>
生活服務(wù)
分享 收藏 導(dǎo)長(zhǎng)圖 關(guān)注 下載文章
綁定賬號(hào)成功
后續(xù)可登錄賬號(hào)暢享VIP特權(quán)!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服