鼠标经过图片变色代码实例Mouse color change through thepicture code examples
Two ways to change color of mouse through picture:
First kind:
<script language= "JavaScript" >
<! --
Function makevisible (cur, which) {
If (which==0)
Cur.filters.alpha.opacity=70
Else
Cur.filters.alpha.opacity=100
}
/-->
</script>
<img src=, /images/logo.gif, style=, filter:alpha
(opacity=100) , onmouseover=, makevisible (this, 0) ,onmouseout=, makevi sible (this, 1) >
Second kinds:
<SCR IPT LANGUAGE= "JavaSc r ip t" >
< - Begin
If ( (navigator.appName. indexOf ('Microsoft' ) , +1)) {Document.write ('<style, type=, text/css) , .Opacity1,
{filter:alpha (opacity=50) , } , .Opacity2, {f ilter:alpha(opacity=100) , } , </style>' ) }
If ( (navigator.appName. indexOf ('Netscape' ) , +1) ) {
Document.write ('<style, type=, text/css, >.Opacity1,{-moz-opacity:0. 5} , .Opacity2, {-moz-opacity: 1} , </style>' ) }{else
Document.write (' ' ) ; }
/ / End /
</script>
<img, src=, /images/logo.gif, width=, 109, height=, 73,border=, 0, class=, opacity2, onmouseover=,this.className='opacity1' "
Onmouseout= "thi s.className='opacity2' " >
A little while ago to see an article "using CSS3 imitationwindow7 start menu", the dynamic effect only using the CSS3implementation of the Windows 7 start menu in the text, has longbeen attracted to WPF/Silverlight mountain scenery, not toother mountains are also fun. Then, a whim, also try to do aWindows 7 desktop effects, first see a few screenshots.Desktop program, mouse, Hover effect:
Taskbar program, mouse Hover effect:
Start menu effect:
Desktop Icon
The desktop background and program icons are structured asfollows:
<div id= "win" >
<ul id= "app" >
<li>
<a href= "#" >
<img src= "images/computer.png" / > ><br
Computer</a>
</li>
<li>
<a href= "#" >
<img src= "images/recycle.png" / > ><brRecycle Bin</a>
</li>
<li>
<a href= "#" >
<img src= "images/network.png" / > ><brNetwork</a>
</li>
</ul>
</div>
Add background pictures to desktop <div>:#win
{
Background-image: URL (images/win7bg. jpg) ;
Background-posit ion: center;
Width: 880px;
Height: 550px;
Border: #ffffff 1px solid;
}
To add mouse Hover dynamic effects to desktop application icons,text-shadow is used to set the application text shading effect,and -webkit-border-radius to set the border fillet:
#app
{
Float: left;
Text-align: center;
Margin: -15px 00 -30px;
List-style: none;
}
#app a
{
Text-decoration: none;
Border: solid 1px transparent;
Display: block;
Padding: 3px;
Margin: 20px 000;
Color: #ffffff;
Text-shadow: , 0.2em, 0. 1em, 0.3em, #000000;}
#app a:hover
{
Border: solid 1px #bbd6ec;
-webkit-border-radius: 3px;
Box-shadow: inset 00 1px #fff;
-webkit-box-shadow: inset 00 1px #fff;
Background-color: #5caae8;
}
Taskbar icon
Here is the HTML code for the taskbar structure:<div id= "taskbar" >
<a href= "#" id= "start" ></a>
<a href= "#" style= "left: 60px" >
<img src= "images/ie.png" / >
</a>
<a href= "#" style= "left: 120px" >
<img src= "images/library.png" / >
</a>
<a href= "#" style= "left: 180px" >
<img src= "images/mp.png" / >
</a>
< a href = "#" style = "left: 240px" >
< img src = "images / live.png" / >
< / a >
< a href = "#" style = "left: 300px" >
< img src = "images / outlook.png" / >
< / a >
< div id = "desktop" > < / div >
< / div >
首先来看看开始菜单图标如何设置,通过hover操作变换s t ar t.b mp显示位置,达到图标发亮效果.
# taskbar # s tart
{position: absolute;text - align: center;integral part: 57px;height: 46px;background: url (images / start.bmp) 0 - 6px well - repeat;
}
# taskbar # start: hover
{text - decoration: none;background - pos ition: 0 - 114px;
}
任务栏背景通过taskbarbg.png实现,其他图标hover效果通过改变taskbarhover.png图片位置实现图标下方高亮效果.
#广州中维财税http: / / 101. 1. 28. 14 / taskbar
{height: 42px;integral part: 880px;margin: - 42px 0 0 1px;background: url (images / taskbarbg.png) well - repeat;}
# taskbar img
前些天赵容分享过DogYun(狗云)香港BGP线路AMD 5950X经典低价云服务器的信息(点击查看),刚好账户还有点余额够开个最低配,所以手贱尝试下,这些贴上简单测试信息,方便大家参考。官方网站:www.dogyun.com主机配置我搞的是最低款优惠后14.4元/月的,配置单核,512MB内存,10GB硬盘,300GB/50Mbps月流量。基本信息DogYun的VPS主机管理集成在会员中心,包括...
Sharktech又称SK或者鲨鱼机房,是一家主打高防产品的国外商家,成立于2003年,提供的产品包括独立服务器租用、VPS云服务器等,自营机房在美国洛杉矶、丹佛、芝加哥和荷兰阿姆斯特丹等。之前我们经常分享商家提供的独立服务器产品,近期主机商针对云虚拟服务器(CVS)提供优惠码,优惠后XS套餐年付最低仅33.39美元起,支持使用支付宝、PayPal、信用卡等付款方式。下面以XS套餐为例,分享产品配...
SoftShellWeb是一家2019年成立的国外主机商,商家在英格兰注册,提供的产品包括虚拟主机和VPS,其中VPS基于KVM架构,采用SSD硬盘,提供IPv4+IPv6,可选美国(圣何塞)、荷兰(阿姆斯特丹)和台湾(台北)等机房。商家近期推出台湾和荷兰年付特价VPS主机,其中台湾VPS最低年付49美元,荷兰VPS年付24美元起。台湾VPSCPU:1core内存:2GB硬盘:20GB SSD流量...