html网页特效 网页设计html软件
各位老铁们好,相信很多人对html网页特效都不是特别的了解,因此呢,今天就来为大家分享下关于html网页特效以及网页设计html软件的问题知识,还望可以帮助大家,解决大家的一些困惑,下面一起来看看吧!
如何实现网页特效
图片不间断滚动代码:
</p>
<div id=demo style=overflow:hidden;height:300;width:150>
<div id=demo1>
<img src='roll/1.png'><br>
<img src='roll/2.png'><br>
<img src='roll/3.png'><br>
<img src='roll/4.png'><br>
<img src='roll/5.png'><br>
<img src='roll/6.png'><br>
<img src='roll/7.png'><br>
<img src='roll/8.png'><br>
<img src='roll/3.png'><br>
<img src='roll/4.png'><br>
<img src='roll/5.png'><br>
<img src='roll/6.png'><br>
<img src='roll/7.png'><br>
<img src='roll/8.png'><br>
<img src='roll/2.png'><br>
</div>
<div id=demo2></div>
</div>
<p>
<script>
var speed=30;
demo2.innerHTML=demo1.innerHTML
function Marquee()
{
if(demo2.offsetTop-demo.scrollTop<=0)
demo.scrollTop-=demo1.offsetHeight;
else
demo.scrollTop++;
}
var MyMar=setInterval(Marquee,speed)
demo.onmouseover=function(){clearInterval(MyMar)}
demo.onmouseout=function(){MyMar=setInterval(Marquee,speed)}
</script>
</p>
插入音乐代码:
1.如何贴rm,ra,ram类型的音乐,代码如下:
<embed width="0" height="0" type="audio/x-pn-realaudio-plugin" autostart="true" controls="ControlPanel" src="";>
2.如何贴midi,asf,wma,asx类型的音乐,代码如下:
<embed autostart="true" loop="-1" controls="ControlPanel" width="0" height="0" src="";>
滚动字幕代码:
1.建立第一个滚动字幕。代码:
<marquee width="200" height="100" direction="right" behavior="alternate" scrollamount="6" scrolldelay="88">欢迎光临1</marquee>
2.各参数详解:
a)scrollAmount。它表示速度,值越大速度越快。如果没有它,默认为6,建议设为1~3比较好。
b)width和height,表示滚动区域的大小,width是宽度,height是高度。特别是在做垂直滚动的时候,一定要设height的值。
c)direction。表示滚动的方向,默认为从右向左:←←←。可选的值有right、down、up。滚动方向分别为:right表示→→→,up表示↑,down表示↓。
d)scrollDelay,这也是用来控制速度的,默认为90,值越大,速度越慢。通常scrollDelay是不需要设置的。
e)behavior。用它来控制属性,默认为循环滚动,可选的值有alternate(交替滚动)、slide(幻灯片效果,指的是滚动一次,然后停止滚动)
网页特效代码
在HTML文件中添加网页特效代码,一般有三种情况。
第一,只加在HTML文件头部,即HTML文件中<head>……</head>之间的代码。这类代码只需要加在这个部分,即可达到预期的效果。
第二,只加在HTML文件体部。即HTML文件中<body>……</body>之间的代码。这类代码只需要加在这个部分,即可达到预期的效果。如在你题目中提到的就属于这一类。
除上述情况外,多数代码需要先在头部(<head>……</head>之间)在上一些属性性质的代码,但是特效的主代码需要添加在体部(body>……</body>之间),否则,特效不能正常显示,有时还会出现错误,影响整个页面的正常显示。
添加特效代码的方法:
先要用HTML编辑软件,如常见的文本编辑器“记事本”,打开需要编辑的文件,根据特效代码的要求,在文件中找到相应位置,复制,粘贴特效代码,保存即可。修改完毕后,即可在浏览器中看到相应的效果。
在添加的时候一定要注意,一定要按照特效源码的要求添加,此外,还要保证源码的完整性,一个标点符号都不能少,也不能多。
另外要说的是,根据我的经验,直接从网上复制来的代码,不一定都能直接粘贴了用,一部分必须通过一个软件来中转。比如,先把网上的代码复制后,粘贴到“记事本”中,然后再复制、粘贴到相应的文件位置上。
最后,介绍你几个经典网页特效站。
1、网页特效集锦:
2、javascript网页特效:
3、万旭网页特效:
4、网页特效梦工厂:
5、网页制作大宝库网页特效大全:
求一个网页特效的代码
给你两种代码,自己选择。第一种要等全部文字消失后才开始下一轮的滚动,第二种是无缝滚动,也就是还没等最后一句消失,下一次滚动已经开始。新闻链接的滚动大部分都是采取第二种。代码中出现的#号表示链接地址。其余参数自行调整。
<MARQUEE onmouseover=this.stop() onmouseout=this.start() style="LEFT: 0px; POSITION: absolute; line-height:20px;TOP=100px;" scrollAmount=2 direction=up height=120 width=200><font color=#B0D8DC size=2><center><a rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" href="#">你在做什么</a><br>
<br>
<a rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" href="#">我在仰望天空</a><br>
<br>
<a rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" href="#">30度仰望是什么</a><br>
<br>
<a rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" href="#">是我想念她的角度</a><br>
<br>
<a rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" href="#">为什么要把头抬到30度</a><br>
<br>
<a rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" href="#">为了不让我的眼泪掉下来</a><br></MARQUEE>
二、文字向上无缝滚动
<div id=marquees style="height=100px;LEFT: 60px; POSITION: absolute; TOP: 100px;"><font style="font-family:宋体; color:white; font-size:14px;line-height=15px">
<a rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" href="#">你在做什么</a><br>
<br>
<a rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" href="#">我在仰望天空</a><br>
<br>
<a rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" href="#">30度仰望是什么</a><br>
<br>
<a rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" href="#">是我想念她的角度</a><br>
<br>
<a rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" href="#">为什么要把头抬到30度</a><br>
<br>
<a rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" href="#">为了不让我的眼泪掉下来</a><br>
<br>
<br>
<br>
</div>
<script language="JavaScript">
marqueesHeight=100;
stopscroll=false;
with(marquees){
style.width=0;
style.height=marqueesHeight;
style.overflowX="visible";
style.overflowY="hidden";
noWrap=true;
onmouseover=new Function("stopscroll=true");
onmouseout=new Function("stopscroll=false");
}
document.write('<div id="templayer" style="position:absolute;z-index:1;visibility:hidden"></div>');
preTop=0; currentTop=0;
function init(){
templayer.innerHTML="";
while(templayer.offsetHeight<marqueesHeight){
templayer.innerHTML+=marquees.innerHTML;
}
marquees.innerHTML=templayer.innerHTML+templayer.innerHTML;
setInterval("scrollup()",30);
}
document.body.onload=init;
function scrollup(){
if(stopscroll==true) return;
preTop=marquees.scrollTop;
marquees.scrollTop+=1;
if(preTop==marquees.scrollTop){
marquees.scrollTop=templayer.offsetHeight-marqueesHeight;
marquees.scrollTop+=1;
}
}
</script>
好了,文章到此结束,希望可以帮助到大家。