所以,如果你去MySpace例如(http://www.myspace.com/sonidolalimpia),你现在看到当你把鼠标放在上面时,徽标有一个非常有趣的效果,他们是怎么做到的?
答案 0 :(得分:1)
正如已经写好的,所有技巧都不在flash中,而是在css和jQuery中。他们使用jQuery onMouseOver Event并简单地用透明闪光灯切换徽标的图片版本。
前
<h2>
<a href="/" class="MSIcon MSLogo" id="msStaticLogo" style="left: 0pt;">
Myspace
</a>
</h2>
<div id="flashLogoContainer">
<a href="/">
<span id="logoInTrigger">
Myspace
</span>
</a>
<object width="354" height="475" type="application/x-shockwave-flash"
data="http://cms.myspacecdn.com/cms/x/11/3/bag.swf" id="msFlashLogos"
style="visibility: visible; top: -28px; left: -9999px;">
<param name="quality" value="high">
<param name="wmode" value="transparent">
<param name="bgcolor" value="transparent">
<param name="allowscriptaccess" value="always">
</object>
<span class="MSIcon beta" id="beta">Beta</span>
<div id="leftLogoTrigger" style="display: none;"></div>
<div id="rightLogoTrigger" style="display: none;"></div>
<div id="bottomLogoTrigger" style="display: none;"></div>
</div>
</li>
后
<li class="logo">
<h2>
<a href="/" class="MSIcon MSLogo" id="msStaticLogo" style="left: -9999px;">
Myspace
</a>
</h2>
<div id="flashLogoContainer">
<a href="/">
<span id="logoInTrigger">
Myspace
</span>
</a>
<object width="354" height="475" type="application/x-shockwave-flash"
data="http://cms.myspacecdn.com/cms/x/11/3/bag.swf" id="msFlashLogos"
style="visibility: visible; top: -28px; left: -120px;">
<param name="quality" value="high">
<param name="wmode" value="transparent">
<param name="bgcolor" value="transparent">
<param name="allowscriptaccess" value="always">
</object>
<span class="MSIcon beta" id="beta">Beta</span>
<div id="leftLogoTrigger" style="display: block;"></div>
<div id="rightLogoTrigger" style="display: block;"></div>
<div id="bottomLogoTrigger" style="display: block;"></div>
</div>
</li>