鼠标经过图片变色代码实例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
酷锐云是一家2019年开业的国人主机商家,商家为企业运营,主要销售主VPS服务器,提供挂机宝和云服务器,机房有美国CERA、中国香港安畅和电信,CERA为CN2 GIA线路,提供单机10G+天机盾防御,提供美国原生IP,支持媒体流解锁,商家的套餐价格非常美丽,CERA机房月付20元起,香港安畅机房10M带宽月付25元,有需要的朋友可以入手试试。酷锐云自开业以来一直有着良好的产品稳定性及服务态度,支...
酷番云怎么样?酷番云就不讲太多了,介绍过很多次,老牌商家完事,最近有不少小伙伴,一直问我台湾VPS,比较难找好的商家,台湾VPS本来就比较少,也介绍了不少商家,线路都不是很好,有些需求支持Windows是比较少的,这里我们就给大家测评下 酷番云的台湾VPS,支持多个版本Linux和Windows操作系统,提供了CN2线路,并且还是原生IP,更惊喜的是提供的是无限流量。有需求的可以试试。可以看到回程...
前几天看到网友反馈到PacificRack商家关于处理问题的工单速度慢,于是也有后台提交个工单问问,没有得到答复导致工单自动停止,不清楚商家最近在调整什么。而且看到有网友反馈到,PacificRack 商家的之前年付低价套餐全部下架,而且如果到期续费的话账单中的产品价格会涨价不少。所以,如果我们有需要续费产品的话,谨慎选择。1、特价产品下架我们看到他们的所有原来发布的特价方案均已下架。如果我们已有...