📄 ◤css教程_css结合js的运用 --▃▄ 龙 人 网 络 ▄▃.htm
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0039)http://www.rr365.net/edu-css/css107.htm -->
<HTML><HEAD><TITLE>◤CSS教程.CSS结合JS的运用 --▃▄ 龙 人 网 络 ▄▃</TITLE>
<META http-equiv=Content-Language content=zh-cn>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content="CSS教程,CSS技巧 " name=keywords>
<META
content=网页制作教程:asp教程,ASP.net教程,XML教程,PHP教程,FrontpageXP教程,DreamWeaverMX教程,JSP教程,JavaScript教程,VBScript教程,CSS教程,FrontpageXP,DreamWeaverMX,JSP,JavaScript,VBScript,CSS,asp,ASP.net,XML,PHP相关技巧及资源
name=description><LINK href="◤CSS教程_CSS结合JS的运用 --▃▄ 龙 人 网 络 ▄▃.files/style.css"
type=text/css rel=stylesheet>
<META content="MSHTML 6.00.2900.2604" name=GENERATOR></HEAD>
<BODY language=Javascript1.2
onmouseover="window.status='欢迎光临【龙人网站】www.rr365.net,专业服务全为您!!!';return true"
onclick=dynOutline() ;>
<TABLE id=table1 width="100%">
<TBODY>
<TR>
<TD background="◤CSS教程_CSS结合JS的运用 --▃▄ 龙 人 网 络 ▄▃.files/logo4.gif" colSpan=8
height=30> </TD></TR>
<TR>
<TD width=195 height=53><A href="http://www.rr365.net/index.htm"><IMG
height=53 alt=网站优化,网站排名
src="◤CSS教程_CSS结合JS的运用 --▃▄ 龙 人 网 络 ▄▃.files/logo-up.gif" width=195
border=0></A></TD>
<TD colSpan=7>
<H1 align=center>网页制作教程:CSS教程</H1></TD></TR>
<TR>
<TD background="◤CSS教程_CSS结合JS的运用 --▃▄ 龙 人 网 络 ▄▃.files/logo-bt.gif"
height=31>
<P align=center><A
href="http://www.rr365.net/edu-webdesign/index.htm"><FONT
color=#000000>网页制作教程</FONT></A></P></TD>
<TD align=middle bgColor=#e5ecf9><B><A
href="http://www.rr365.net/index.htm">首 页</A></B></TD>
<TD align=middle bgColor=#e5ecf9>
<DIV><B><A
href="http://www.rr365.net/web-promotion.htm">网站推广</A></B></DIV></TD>
<TD align=middle bgColor=#e5ecf9><B><A
href="http://www.rr365.net/webrestruction.htm">网站优化</A></B></TD>
<TD align=middle bgColor=#e5ecf9>
<DIV><B><A
href="http://www.rr365.net/agent/emarketing.htm">轻松代理</A></B></DIV></TD>
<TD align=middle bgColor=#e5ecf9><B><A
href="http://www.rr365.net/webhosting.htm">虚拟主机</A></B></TD>
<TD align=middle bgColor=#e5ecf9>
<DIV><B><A
href="http://www.rr365.net/vpp/domain.htm">域名注册</A></B></DIV></TD>
<TD align=middle bgColor=#e5ecf9><B><A
href="http://www.rr365.net/webdesign.htm">网站建设</A></B></TD></TR></TBODY></TABLE>
<TABLE id=table2 width="100%">
<TBODY>
<TR>
<TD bgColor=#00ccff colSpan=2 height=10> </TD></TR>
<TR>
<TD vAlign=top width="23%" bgColor=#e5ecf9 rowSpan=5>
<P><IMG height=25 src="◤CSS教程_CSS结合JS的运用 --▃▄ 龙 人 网 络 ▄▃.files/logo6.gif"
width=25 border=0> <B><A href="http://www.rr365.net/edu-css/css.htm"><FONT
color=#ff0000>CSS教程</FONT></A></B></P>
<UL style="FONT-SIZE: 10pt; LINE-HEIGHT: 13pt">
<LI><A href="http://www.rr365.net/edu-css/css.htm">认识CSS</A>
<LI><A href="http://www.rr365.net/edu-css/css102.htm">语法</A>
<LI><A href="http://www.rr365.net/edu-css/css103.htm">伪类—动态链接</A>
<LI><A href="http://www.rr365.net/edu-css/css104.htm">CSS属性</A>
<LI><A href="http://www.rr365.net/edu-css/css105.htm">CSS定位</A>
<LI>
<P style="LINE-HEIGHT: 13pt" align=left><A
href="http://www.rr365.net/edu-css/css106.htm">滤镜</A> </P>
<LI>
<P style="LINE-HEIGHT: 13pt" align=left><A
href="http://www.rr365.net/edu-css/css107.htm">CSS结合JS的运用</A> </P>
<LI>
<P style="LINE-HEIGHT: 13pt" align=left><A
href="http://www.rr365.net/edu-css/css108.htm">如何在网页中插入CSS</A>
</P></LI></UL>
<P><IMG height=25
src="◤CSS教程_CSS结合JS的运用 --▃▄ 龙 人 网 络 ▄▃.files/logo411.gif" width=25
border=0> <FONT color=#000000><B><A
href="http://www.rr365.net/edu-css/css2.htm"><FONT
color=#008080>CSS技巧</FONT></A></B></FONT></P>
<P><IMG height=25
src="◤CSS教程_CSS结合JS的运用 --▃▄ 龙 人 网 络 ▄▃.files/logo411.gif" width=25
border=0> <FONT color=#008080><B>CSS相关网站</B></FONT></P>
<UL style="FONT-SIZE: 10pt; LINE-HEIGHT: 13pt">
<LI><A href="http://www.w3.org/Style/CSS/" target=_blank>W3C之CSS规范</A>
<LI><A href="http://www.w3schools.com/css/default.asp" target=_blank>CSS
Tutorial</A> </LI></UL>
<P><IMG height=25
src="◤CSS教程_CSS结合JS的运用 --▃▄ 龙 人 网 络 ▄▃.files/logo411.gif" width=25
border=0> <B><FONT color=#000000><A
href="http://www.rr365.net/edu-css/css4.htm"><FONT
color=#008080>CSS相关软件</FONT></A></FONT></B></P>
<P> </P> </TD>
<TD width="77%">
<UL type=square>
<LI>
<P align=center><U><B><FONT size=4>CSS教程.CSS结合JS的运用</FONT></B></U></P>
<P align=left> </P>
<P style="LINE-HEIGHT: 17pt"> <SPAN
style="FONT-SIZE: 11pt">利用CSS配合JavaScript的可以做很多更酷的动态页面效果,在本教程的最后给大家简单介绍一下CSS配合JS的应用。首先,我们要搞清楚事件和动作的概念。在客户端脚本中,JavaScript
通过对事件进行响应来获得与用户的交互。例如,当用户单击一个按钮或者在某段文字上移动鼠标时,就触发了一个单击事件或鼠标移动事件,通过对这些事件的响应,可以完成特定的功能(例如,单击按钮弹出对话框,鼠标移动到文本上后文本变色等)。<BR> 下面介绍几种常见的事件(还用更多事件,请查阅相关资料):<BR> onClick:鼠标单击事件。(是指鼠标按下,然后松开时产生。)<BR> onDblClick:鼠标双击事件。(是指鼠标快速按下,松开,并再次按下时产生。)<BR> onMouseDown:鼠标按下事件。(鼠标按下时即产生。)<BR> onMouseUp:鼠标释放事件。(是指鼠标从按下的状态到弹起。)<BR> onMouseMove:鼠标移动事件。(是指在特定元素上移动鼠标。)<BR> onMouseOver:鼠标经过事件。(是指当指针从外界往元素上移动时产生。)<BR> onMouseOut:鼠标离开事件。(是指鼠标从特定元素上离开时产生。)<BR> onLoad:载入事件。(当图像或页面结束载入时产生。)<BR> onUnload:卸载事件。(当访问者离开页面时产生。)<BR> onScroll:滚动条滚动事件。(当访问者使用卷轴上移或下移时产生。)<BR> 有了事件以后,我们就为事件加上动作。这里只说改变当前元素自定义样式的动作,我们可以用这个方法先设定好两个自定义的<A
href="http://www.rr365.net/edu-css/css.htm"><FONT
color=#000000>CSS</FONT></A>样式,对象原先调用第一种样式,当产生鼠标事件时让对象应用到第二种CSS样式,而产生的鼠标效果,看下面这个例子。<BR> 在网页中插入一个图像,自定义一个“.out”样式,用gray滤镜使图片变成黑白的:(^60090411k1^)<BR> 将这个自定义样式应用到图片上,在浏览器中预览到图片变成了黑白,我们再定义一个样式“.over”,这个样式没有任何内容,是空样式,样式表代码如下:<BR> <style
type="text/css"><BR> <!--<BR> .over {}<BR> .out {filter:
Gray}<BR> --><BR> </style><BR> 然后在图片标记(IMG)里加上“onMouseOver="this.className='over'"
onMouseOut="this.className='out'"”,意思为当鼠标经过时,图片为over样式,即彩色正常图像;当鼠标离开时,图片为out样式,即黑白图像。onMouseOver和onMouseOut是鼠标事件,this.className='…'表示当前对象的class名为…,注意大小写不要写错,JS对大小写非常敏感。<BR> 这样这个效果就完成了,保存后在浏览器里打开,图像是黑白的,当鼠标移上去时,图像变成彩色,鼠标离开时,图像又变回黑白。只要发挥你的想象,通过this.className方法还可以做出很多好看的鼠标效果。</SPAN><BR>
<P align=left><BR></P></LI></UL></TD></TR>
<TR>
<TD>
<P
align=center>
<A href="http://www.rr365.net/edu-css/css106m.htm">上一节</A>|<A
href="http://www.rr365.net/edu-css/css108.htm">下一节</A></P></TD></TR>
<TR>
<TD>
<HR width="75%" color=#e5ecf9>
<P align=center>网页教程: <A
href="http://www.rr365.net/edu-asp/index.htm">ASP</A>| <A
href="http://www.rr365.net/edu-asp-net/asp-net.htm">ASP.net</A>| <A
href="http://www.rr365.net/edu-xml/xml.htm">XML</A>| <A
href="http://www.rr365.net/edu-php/php.htm">PHP4</A> | <A
href="http://www.rr365.net/edu-frontpage/frontpage.htm">FrontpageXP</A> |
<A
href="http://www.rr365.net/edu-dreamweaver/dreamweaver.htm">DreamWeaverMX</A></P>
<P
align=center>
<A href="http://www.rr365.net/edu-cplus/c.htm">C#</A>| <A
href="http://www.rr365.net/edu-jsp/jsp.htm">JSP</A> | <A
href="http://www.rr365.net/edu-javascript/javascript.htm">JavaScript</A> |
<A href="http://www.rr365.net/edu-vbscript/vbscript.htm">VBScript</A> | <A
href="http://www.rr365.net/edu-css/css.htm">CSS</A></P></TD></TR>
<TR>
<TD>
<HR width="50%" color=#e5ecf9>
<P> </P></TD></TR>
<TR>
<TD>
<FORM name=query0 action=http://www1.baidu.com/baidu method=get
target=_blank>
<DIV align=center><INPUT type=hidden value=baidu name=tn0> <A
href="http://www.baidu.com/"><IMG alt=Baidu
src="◤CSS教程_CSS结合JS的运用 --▃▄ 龙 人 网 络 ▄▃.files/baidu_logo.gif" align=bottom
border=0></A> <INPUT size=15 name=word0> <IFRAME border=0 name=I1
marginWidth=0 marginHeight=0
src="◤CSS教程_CSS结合JS的运用 --▃▄ 龙 人 网 络 ▄▃.files/help1.htm" frameBorder=no
width=0 scrolling=no height=0></IFRAME><INPUT type=submit value=百度搜索>
</DIV></FORM> </TD></TR></TBODY></TABLE>
<TABLE id=table3 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD style="BORDER-BOTTOM: 1px solid" borderColor=#00ccff height=21> </TD></TR>
<TR>
<TD background="◤CSS教程_CSS结合JS的运用 --▃▄ 龙 人 网 络 ▄▃.files/tdbg.gif"
bgColor=#e5ecf9>
<P align=center><B><A
href="http://www.rr365.net/summary/aboutus.htm">关于我们</A>-<A
href="http://www.rr365.net/summary/paymethod.htm">付款方式</A>-<A
href="http://www.rr365.net/helpcenter/helpcenter.htm">帮助中心</A>-<A
href="http://www.rr365.net/agent/agent.htm">轻松代理</A>-<A
href="http://www.rr365.net/sitemap.htm">网站地图</A>-<A
href="mailto:support@rr365.net">联系我们</A></B></P></TD></TR></TBODY></TABLE></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -