[求助]一个鼠标经过的效果
[求助]一个鼠标经过的效果<BR><BR>有文字“首页”当鼠标经过的时候,变成粗体“<STRONG>首页</STRONG>”,离开的时候,变回原样。<BR>请问怎么弄?回复:(风过无影)你可以用css做; 还有我告诉你;如查...
<P>这个我会,够大吧,哈哈<BR><BR>[code]<BR><style><BR><!--<BR>.bolderClass {<BR> font-weight:900;<BR> font-size: 400px;<BR>}<BR>--><BR></style><BR><div onmouseover="this.className='bolderClass'" onmouseout="this.className='';">首页</div><BR>[/code]</P> lmhllr 你的技术我是信得过的,但是,~我要变粗体,不是变这么大的字体~~~[em09] 粗体应该也有那个属性吧 3楼的老大你也太夸张了撒<BR>楼主可以在3楼的代码内修改下撒<BR> <P>[code]<br><style><br><!--<br>.font_B {<br> font-weight:900;<br> //font-size: 18px;<br>}<br>--><br></style><br><div onmouseover="this.className='font_B'" onmouseout="this.className='';">加粗</div><br>[/code]</P>[align=right][color=#000066][此贴子已经被作者于2007-7-10 16:38:12编辑过][/color][/align]
<P>[code]<BR><script><BR>//爆裂代码<BR>var x_step=new Array();<BR>var y_step=new Array();<BR>var x_randompos=new Array();<BR>var y_randompos=new Array();<BR>var x_startpos=0;<BR>var y_startpos=0;<BR>var x_slices=8;<BR>var y_slices=3;<BR>var width_slice=0;<BR>var height_slice=0;<BR>var spancounter=0;<BR>var pause=10;<BR>var max_loop=20;<BR>var i_loop=0;</P>
<P>function explode_init(f)<BR>{<BR> spancounter=0;<BR> if (f.all) {<BR> for (i=0;i<=y_slices-1;i++) {<BR> for (ii=0;ii<=x_slices-1;ii++) {<BR> f.write("<span id='span"+spancounter+"' style='POSITION: absolute;display: ;'></span>");<BR> spancounter++<BR> }<BR> }<BR> spancounter=0;<BR> }<BR>}</P>
<P>function explode_start(obj)<BR>{<BR> var f=wog_view.document;<BR> var img = f.getElementById(obj);//eval("parent.wog_view.document."+obj);<BR> <BR> width_slice=Math.floor(img.width/x_slices);<BR> height_slice=Math.floor(img.height/y_slices);<BR> <BR> if(img.style.left.search("%")==-1)<BR> {<BR> x_startpos = img.style.posLeft;<BR> }<BR> else<BR> {<BR> x_startpos = (f.body.offsetWidth-20) * (img.style.posLeft)/100;<BR> }</P>
<P> if(img.style.top.search("%")==-1)<BR> {<BR> y_startpos = img.style.posTop;<BR> }<BR> else<BR> {<BR> y_startpos = (f.body.offsetHeight - 5) * img.style.posTop/100;<BR> }<BR> <BR> cliptop=0;<BR> clipbottom=height_slice;<BR> clipleft=0;<BR> clipright=width_slice;<BR> i_loop=0;</P>
<P> spancounter=0;<BR> for (i=0;i<=y_slices-1;i++) {<BR> for (ii=0;ii<=x_slices-1;ii++) {<BR> x_randompos[spancounter] = Math.ceil(f.body.offsetWidth*Math.random());<BR> y_randompos[spancounter] = Math.ceil(f.body.offsetHeight*Math.random());<BR> var thisinnerspan=f.getElementById("span"+spancounter);<BR> thisinnerspan.innerHTML="<img id='spimg"+spancounter+"' src='"+img.src+"' style='FILTER: alpha(opacity=100);'>"<BR> thisinnerspan.style.posLeft = x_startpos;<BR> thisinnerspan.style.posTop = y_startpos;<BR> thisinnerspan.style.clip = "rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")";<BR> clipleft+=width_slice;<BR> clipright+=width_slice;<BR> spancounter++;<BR> }<BR> clipleft=0<BR> clipright=width_slice<BR> cliptop+=height_slice<BR> clipbottom+=height_slice<BR> }<BR> spancounter=0;</P>
<P> img.style.display = "none";<BR> explode_IE(f);<BR>}</P>
<P>function explode_IE(f) {<BR> spancounter=0;</P>
<P> for (i=0;i<=y_slices-1;i++) {<BR> for (ii=0;ii<=x_slices-1;ii++) {<BR> try{<BR> var thisspan=f.getElementById("span"+spancounter).style;<BR> x_step[spancounter]=(x_randompos[spancounter]-thisspan.posLeft)/(max_loop);<BR> y_step[spancounter]=(y_randompos[spancounter]-thisspan.posTop)/(max_loop);<BR> thisspan.posLeft+=x_step[spancounter];<BR> thisspan.posTop+=y_step[spancounter];<BR> var eimg = f.getElementById("spimg"+spancounter);<BR> eimg.filters.alpha.opacity = (eimg.filters.alpha.opacity-100/(max_loop));<BR> spancounter++;<BR> if(max_loop==i_loop) thisspan.display = "none";<BR> }catch(e){}<BR> }<BR> }<BR> i_loop++;</P>
<P> spancounter=0;<BR> if(max_loop>=i_loop) var timer=setTimeout("explode_IE(parent.wog_view.document)",pause);<BR>}<BR>//爆裂代码结束<BR></script></P>
<P><form id="wog_view"><BR><img id="img" src="<a href="http://bbs.bc-cn.net/aaa/logo.gif" target="_blank" >http://bbs.bc-cn.net/aaa/logo.gif</A>"><BR></form><BR><script><BR>explode_init(wog_view.document);<BR>explode_start("img");<BR></script></P>
<P>[/code]<BR></P> [CODE]<script language="javascript"><BR>function shou1(a){a.className="se"}<BR>function shou2(a){a.className=""}<BR></script><BR><style type="text/css"><BR>td{cursor: hand;}<BR>.se{<BR>color:blue;<BR>filter:glow(color:red,strength:5)<BR>}<BR></style><BR><table width="798" height="40" border="0" cellspacing="0" cellpadding="0"><BR><tr id="a1" align="center" ><BR><td onMouseOver="shou1(this)" onMouseOut="shou2(this)">首页</td><BR><td onMouseOver="shou1(this)" onMouseOut="shou2(this)">学习</td><BR><td onMouseOver="shou1(this)" onMouseOut="shou2(this)">开心</td><BR><td onMouseOver="shou1(this)" onMouseOut="shou2(this)">班级</td><BR><td onMouseOver="shou1(this)" onMouseOut="shou2(this)">aaaa</td><BR><td onMouseOver="shou1(this)" onMouseOut="shou2(this)">注册</td><BR></tr></table>[/CODE] <DIV class=htmlcode>
<P><html><head><title>aa</title><br><Meta content=revealTrans(Transition=14,Duration=3.0) http-equiv=Page-enter><br><style type="text/css"><br>div{<br>width:0px;<br>background:url(http://bbs.city597.com/upload/2006/11/08/150155.gif )<br>}<br>table{<br>letter-spacing:2px;<br>font-size:20px;<br>font-weight:100;<br>filter:mask(color=#000000)<br>}<br></style><br></head><body bgcolor="#000000"><div><table border="0" cellpadding="0" cellspacing="0"><br><tr><td id="aa">我是中国人</td></tr></table></div><br></body></html><br><form><br>请输入:<input type="text" name="ab"><br><input type="button" value="变成闪字" onclick="ss(ab.value)"><br></form><br><script language="javascript"><br>function ss(a){<br>aa.innerText=a<br>}<br></script> </P></DIV><br>
[align=right][color=#000066][此贴子已经被作者于2007-7-13 12:35:59编辑过][/color][/align]
取消超连接有问题啊,斑竹 <DIV class=quote><B>以下是引用<U>谁与争疯</U>在2007-7-9 20:18:09的发言:</B><BR>lmhllr 你的技术我是信得过的,但是,~我要变粗体,不是变这么大的字体~~~[em09]</DIV>
<P>谢谢!<BR><BR>我只是弄得好玩点,你修改一下就可以了!font-weight表示字体粗细的。。。size表示大小。。。</P> 一个比一个猛!<BR><BR>8楼和9楼的代码真棒!<BR><BR>我偷偷CP下来了。。。[em02]<BR><BR>10楼那个似乎有问题!没看代码,不知道怎么回事
页:
[1]
