×

网页动态特效代码

求html 代码、就是有动态效果的?如何在个人网站添加特效网页代码

admin admin 发表于2022-06-18 15:02:27 浏览99 评论0

抢沙发发表评论

求html 代码、就是有动态效果的


你说的是文字滚动效果吧?HTML本来就是静态网页,没动态的!
《marquee
width=“160“
height=“60“
direction=“right“
behavior=“alternate“
scrollamount=“6“
scrolldelay=“60“》VBC《/marquee》
其中“VBC“就是要滚动的文字!

如何在个人网站添加特效网页代码


《?xml version=“1.0“ encoding=“gb2312“?》
《!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN“ “’;return true;“ onmouseout=“window.status=’’;return true;“》
《option class=“heading“ selected》字号《/option》
《option value=“1“》一号《/option》
《option value=“2“》二号《/option》
《option value=“3“》三号《/option》
《option value=“4“》四号《/option》
《option value=“5“》五号《/option》
《option value=“6“》六号《/option》
《option value=“7“》七号《/option》
《/select》
《select id=“formatSelect“ name=“formatSelect“ onChange=“FormatText(’FormatBlock’,this[this.selectedIndex].value);“》
《option selected》段落格式《/option》
《option value=“《P》“》普通《/option》
《option value=“《PRE》“》已编排格式《/option》
《option value=“《H1》“》标题一《/option》
《option value=“《H2》“》标题二《/option》
《option value=“《H3》“》标题三《/option》
《option value=“《H4》“》标题四《/option》
《option value=“《H5》“》标题五《/option》
《option value=“《H6》“》标题六《/option》
《/select》
《/td》
《/tr》
《/table》
《/td》
《/tr》
《tr》
《td width=“72%“ align=“center“》

《table width=“98%“》
《tr id=“CodeMode“ style=“display:none;“》
《td style=“border:1px solid #cccccc“ width=“100%“》
《textarea id=“HtmlEditorContent“ name=“HtmlEditorContent“ style=“padding:6px; font-size:14px; WIDTH: 100%; HEIGHT: 200px“》《/textarea》
《/td》
《/tr》
《tr id=“DesignMode“》
《td style=“border:1px solid #cccccc“ width=“100%“》
《iframe id=“HtmlEditor“ name=“HtmlEditor“ MARGINHEIGHT=“6“ MARGINWIDTH=“6“ width=“100%“ height=“200“ frameborder=“0“ scrolling=“yes“》《/iframe》
《/td》
《/tr》
《tr style=“display:none;“》
《td》
《img src=“../../images/editor/editor.gif“ align=“absmiddle“ id=“HtmlDesign“》
《img src=“../../images/editor/html.gif“ align=“absmiddle“ id=“HtmlCode“》
《img src=“../../images/editor/browse.gif“ align=“absmiddle“ id=“HtmlView“》
《textarea name=“content“ id=“content“ style=“VISIBILITY: hidden; OVERFLOW: hidden; POSITION: absolute; WIDTH: 1px; HEIGHT: 1px“》《/textarea》
《div id=“HtmlEditor_Temp_HTML“ style=“VISIBILITY: hidden; OVERFLOW: hidden; POSITION: absolute; WIDTH: 1px; HEIGHT: 1px“》《/div》
《input type=“hidden“ ID=“ContentEdit“ name=“ContentEdit“ value=““》
《input type=“hidden“ ID=“ModeEdit“ name=“ModeEdit“ value=““》
《input type=“hidden“ ID=“ContentLoad“ name=“ContentLoad“ value=““》
《input type=“hidden“ ID=“ContentFlag“ name=“ContentFlag“ value=“0“》
《script language=javascript》 HtmlEditor_Initialized() ; 《/script》
《/td》
《/tr》
《/table》

《/td》
《td width=“28%“ align=“center“》《table width=“100%“ border=“0“ cellspacing=“0“ cellpadding=“4“》
《tr》
《td align=“center“》《font color=“#000000“》选择头像《/font》《/td》
《/tr》
《tr》
《td align=“center“》《select size=“1“ name=“face“ onchange=“showimage()“》

《option value=“0“ selected》好开心《/option》

《option value=“1“》
好难过《/option》

《option value=“2“》
好伤心《/option》

《option value=“3“》
要唱歌《/option》

《option value=“4“》
正哭泣《/option》

《option value=“5“》
很满意《/option》

《option value=“6“》
很惊喜《/option》

《option value=“7“》
好生气《/option》

《option value=“8“》
好害怕《/option》

《option value=“9“》
真倒霉《/option》

《option value=“10“》
扁着嘴《/option》

《option value=“11“》
平常心《/option》

《option value=“12“》
冒冷汗《/option》

《option value=“13“》
伤脑筋《/option》

《option value=“14“》
笑死了《/option》

《option value=“15“》
好气愤《/option》

《/select》
《/td》
《/tr》
《tr》
《td align=“center“》《table border=“0“ align=“center“ cellpadding=“0“ cellspacing=“0“》
《tr》
《td width=“6“》《img src=“../../images/box10_tl.gif“ width=“6“ height=“5“ /》《/td》
《td background=“../../images/box10_tbg.gif“》《img src=“../../images/box10_tbg.gif“ width=“6“ height=“5“ /》《/td》
《td width=“6“》《img src=“../../images/box10_tr.gif“ width=“6“ height=“5“ /》《/td》
《/tr》
《tr》
《td width=“6“ background=“../../images/box10_lbg.gif“》《img src=“../../images/box10_lbg.gif“ width=“6“ height=“5“ /》《/td》
《td bgcolor=“#FFFFFF“》《p》《img src=“../../images/m01.gif“ name=“faceimg“ id=“faceimg“ /》《/p》
《/td》
《td width=“6“ background=“../../images/box10_rbg.gif“》《img src=“../../images/box10_rbg.gif“ width=“6“ height=“5“ /》《/td》
《/tr》
《tr》
《td width=“6“》《img src=“../../images/box10_bl.gif“ width=“6“ height=“5“ /》《/td》
《td background=“../../images/box10_bbg.gif“》《img src=“../../images/box10_bbg.gif“ width=“6“ height=“5“ /》《/td》
《td width=“6“》《img src=“../../images/box10_br.gif“ width=“6“ height=“5“ /》《/td》
《/tr》
《/table》
《/td》
《/tr》
《/table》《/td》
《/tr》
《/table》《/td》
《/tr》
《tr》
《td colspan=“2“》《table width=“100%“ border=“0“ cellspacing=“0“ cellpadding=“0“》
《tr》
《td width=“18%“》《img src=“../../images/template/3/getbook_cooltext08.gif“ width=“97“ height=“22“ /》《/td》
《td width=“9%“》《input name=“GetCode“ type=“text“ id=“GetCode“ size=“4“ maxlength=“4“ /》《/td》
《td width=“17%“》《img src=““ width=“72“ height=“18“ id=“GetCodeImg“ /》《/td》
《td width=“56%“》《input name=“SubmitBtn“ id=“SubmitBtn“ type=“image“ src=“../../images/template/3/button.GIF“ border=“0“ /》
《input name=“replyer“ type=“hidden“ value=““ /》
《input name=“reply_content_id“ type=“hidden“ value=““ /》
《input name=“userid“ type=“hidden“ value=“111433“ /》

《input type=“hidden“ name=“sum_upload_file_size“ value=“0“ /》
《input type=“hidden“ name=“upload_files“ value=““ /》

网页特效代码实现!


《html》《head》《style type=’text/css’》
《!--
a:visited{text-decoration:none;color:slategray;}
a:hover{text-decoration:underline;color:slategray;}
a:link{text-decoration:none;color:slategray;}
--》《/style》《script language=JScript》《!--
//可以打包为js文件;
var x0=0,y0=0,x1=0,y1=0;
var offx=6,offy=6;
var moveable=false;
var hover=’orange’,normal=’slategray’;//color;
var index=10000;//z-index;
//开始拖动;
function startDrag(obj)
{
if(event.button==1)
{
//锁定标题栏;
obj.setCapture();
//定义对象;
var win = obj.parentNode;
var sha = win.nextSibling;
//记录鼠标和层位置;
x0 = event.clientX;
y0 = event.clientY;
x1 = parseInt(win.style.left);
y1 = parseInt(win.style.top);
//记录颜色;
normal = obj.style.backgroundColor;
//改变风格;
obj.style.backgroundColor = hover;
win.style.borderColor = hover;
obj.nextSibling.style.color = hover;
sha.style.left = x1 + offx;
sha.style.top = y1 + offy;
moveable = true;
}
}
//拖动;
function drag(obj)
{
if(moveable)
{
var win = obj.parentNode;
var sha = win.nextSibling;
win.style.left = x1 + event.clientX - x0;
win.style.top = y1 + event.clientY - y0;
sha.style.left = parseInt(win.style.left) + offx;
sha.style.top = parseInt(win.style.top) + offy;
}
}
//停止拖动;
function stopDrag(obj)
{
if(moveable)
{
var win = obj.parentNode;
var sha = win.nextSibling;
var msg = obj.nextSibling;
win.style.borderColor = normal;
obj.style.backgroundColor = normal;
msg.style.color = normal;
sha.style.left = obj.parentNode.style.left;
sha.style.top = obj.parentNode.style.top;
obj.releaseCapture();
moveable = false;
}
}
//获得焦点;
function getFocus(obj)
{
if(obj.style.zIndex!=index)
{
index = index + 2;
var idx = index;
obj.style.zIndex=idx;
obj.nextSibling.style.zIndex=idx-1;
}
}
//最小化;
function min(obj)
{
var win = obj.parentNode.parentNode;
var sha = win.nextSibling;
var tit = obj.parentNode;
var msg = tit.nextSibling;
var flg = msg.style.display==“none“;
if(flg)
{
win.style.height = parseInt(msg.style.height) + parseInt(tit.style.height) + 2*2;
sha.style.height = win.style.height;
msg.style.display = “block“;
obj.innerHTML = “0“;
}
else
{
win.style.height = parseInt(tit.style.height) + 2*2;
sha.style.height = win.style.height;
obj.innerHTML = “2“;
msg.style.display = “none“;
}
}
//关闭;
function cls(obj)
{
var win = obj.parentNode.parentNode;
var sha = win.nextSibling;
win.style.visibility = “hidden“;
sha.style.visibility = “hidden“;
}
//创建一个对象;
function xWin(id,w,h,l,t,tit,msg)
{
index = index+2;
this.id = id;
this.width = w;
this.height = h;
this.left = l;
this.top = t;
this.zIndex = index;
this.title = tit;
this.message = msg;
this.obj = null;
this.bulid = bulid;
this.bulid();
}
//初始化;
function bulid()
{
var str = ““
+ “《div id=xMsg“ + this.id + “ “
+ “style=’“
+ “z-index:“ + this.zIndex + “;“
+ “width:“ + this.width + “;“
+ “height:“ + this.height + “;“
+ “left:“ + this.left + “;“
+ “top:“ + this.top + “;“
+ “background-color:“ + normal + “;“
+ “color:“ + normal + “;“
+ “font-size:10px;“
+ “font-family:Verdana;“
+ “position:absolute;“
+ “cursor:default;“
+ “border:2px solid “ + normal + “;“
+ “’ “
+ “onmousedown=’getFocus(this)’》“
+ “《div “
+ “style=’“
+ “background-color:“ + normal + “;“
+ “width:“ + (this.width-2*2) + “;“
+ “height:20;“
+ “color:white;“
+ “’ “
+ “onmousedown=’startDrag(this)’ “
+ “onmouseup=’stopDrag(this)’ “
+ “onmousemove=’drag(this)’ “
+ “ondblclick=’min(this.childNodes)’“
+ “》“
+ “《span style=’width:“ + (this.width-2*12-4) + “;padding-left:3px;’》“ + this.title + “《/span》“
+ “《span style=’width:12;border-width:0px;color:white;font-family:webdings;’ onclick=’min(this)’》0《/span》“
+ “《span style=’width:12;border-width:0px;color:white;font-family:webdings;’ onclick=’cls(this)’》r《/span》“
+ “《/div》“
+ “《div style=’“
+ “width:100%;“
+ “height:“ + (this.height-20-4) + “;“
+ “background-color:white;“
+ “line-height:14px;“
+ “word-break:break-all;“
+ “padding:3px;“
+ “’》“ + this.message + “《/div》“
+ “《/div》“
+ “《div style=’“
+ “width:“ + this.width + “;“
+ “height:“ + this.height + “;“
+ “top:“ + this.top + “;“
+ “left:“ + this.left + “;“
+ “z-index:“ + (this.zIndex-1) + “;“
+ “position:absolute;“
+ “background-color:black;“
+ “filter:alpha(opacity=40);“
+ “’》by wildwind《/div》“;
document.body.insertAdjacentHTML(“beforeEnd“,str);
}
//--》《/script》《script language=’JScript’》《!--
function initialize()
{
var c = new xWin(“3“,200,160,250,50,“广告名称“,“参数设置可用框架“);//可添加窗口
}
window.onload = initialize;
//--》《/script》《/head》《body onselectstart=’return false’ oncontextmenu=’return false’ scroll=’no’》
《/body》《/html》
-网页动态特效代码