导航: 好喜爱学习网 >> 网站制作 >> 建站心得 >> 值得收藏的东东 50条网页制作小技巧集锦
相关文章
最新文章
文章内容
值得收藏的东东 50条网页制作小技巧集锦
作者:未知 来源:网络收集 录入:管理员

控制横向和纵向滚动条的显隐?---------</iframe>设为首页:---------

文字或图片弹出指定大小的窗口

在body中加入

<scriptlanguage="javascript"type="text/javascript">

functionMM_openBrWindow(theURL,winName,features){window.open(theURL,winName,features);}

</script>

弹出代码

<ahref="#"target="_self"onClick="MM_openBrWindow('windows01.htm','','width=550,height=380')"width="550"height="380"border="0">图片或文字</a>

--------------------------------------------------------------------------------

flash按钮加链接

on(press){

getURL("替换www.makewing.com","_blank");

}

--------------------------------------------------------------------------------

跳转页面代码

<metahttp-equiv="refresh"content="5;url=替换www.makewing.com">

--------------------------------------------------------------------------------

细线分隔线

<hrnoshadesize=0color=#C0C0C0>

--------------------------------------------------------------------------------

网页中的自动换行

<tdstyle="word-break:break-all">就搞定了。

完整的是

style="table-layout:fixed;WORD-BREAK:break-all;WORD-WRAP:break-word"

--------------------------------------------------------------------------------

消除ie6自动出现的图像工具栏,设置GALLERYIMG属性为false或no.

<IMGSRC="/newasp/article/UploadPic/2006826/200682621357131.jpg"HEIGHT="100px"WIDTH="100px"GALLERYIMG="no">

--------------------------------------------------------------------------------

禁止页面正文内容被选取

<bodyoncontextmenu="returnfalse"ondragstart="returnfalse"onselectstart="returnfalse"onselect="document.selection.empty()"oncopy="document.selection.empty()"onbeforecopy="return

false"onmouseup="document.selection.empty()">

--------------------------------------------------------------------------------

不能点右键,不用CTRL+A,不能复制作!

<bodyoncontextmenu="window.event.returnValue=false"

onkeypress="window.event.returnValue=false"

onkeydown="window.event.returnValue=false"

onkeyup="window.event.returnValue=false"

ondragstart="window.event.returnValue=false"

onselectstart="event.returnValue=false">

</body>

--------------------------------------------------------------------------------

IE浏览器支持一个Body属性bgproperties,它可以让背景不滚动:

<BodyBackground="图片文件"bgproperties="fixed">

--------------------------------------------------------------------------------

随机变换背景图象(一个可以刷新心情的特效)

<ScriptLanguage="javascript">

image=newArray(4);//定义image为图片数量的数组

image[0]='tu0.gif'//背景图象的路径

image[1]='tu1.gif'

image[2]='tu2.gif'

image[3]='tu3.gif'

image[4]='tu4.gif'

number=Math.floor(Math.random()*image.length);

document.write("<BODYBACKGROUND="+image[number]+">");

</Script>

--------------------------------------------------------------------------------

flash载入影片

on(release)

{

loadMovie("1-01.swf","_root.loaderclip");

}

--------------------------------------------------------------------------------

图片表单按钮

<formid="form1"name="form1"method="post"action="">

<imgsrc="/newasp/article/UploadPic/2006826/200682621358542.gif"width="62"height="22"onclick="document.form1.submit()"/>

</form>

--------------------------------------------------------------------------------

左右阴影背景的CSS定义方法

body{

text-align:center;

background-repeat:repeat-y;

background-position:center;

background-image:url(../images/bg.jpg);

}

E-MAIL:309076721@163.com
本站为非营利性质个人网站,建站只为个人爱好与学习,内容大多为电脑技术教程;
网站内容来源于互联网收集整理,禁止用于非法途径,如发现本网站上有侵权的文章请联系我们,我们会尽快删除;
本站不对站点内容准确性、完整性和真实性作任何承诺,由此产生的后果本站不承担任何责任,对以上引起的一切法律纠纷本站无权利承担。