鼠标经过图片变色代码实例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
Megalayer 商家在之前也有记录过,商家开始只有提供香港站群服务器和独立服务器,后来也有增加到美国独立服务器,以及前几天也有介绍到有增加香港VPS主机。对于香港服务器之前有过评测(Megalayer香港服务器配置一览及E3-1230 8GB服务器评测记录),这里申请到一台美国独立服务器,所以也准备简单的评测记录。目前市场上我们看到很多商家提供VPS或者云服务器基本上没有什么特别的,但是独立服...
RAKsmart 商家从原本只有专注于独立服务器后看到产品线比较单薄,后来陆续有增加站群服务器、高防服务器、VPS主机,以及现在也有在新增云服务器、裸机云服务器等等。机房也有增加到拥有洛杉矶、圣何塞、日本、韩国、中国香港等多个机房。在年前也有介绍到RAKsmart商家有提供年付129元的云服务器套餐,年后我们看到居然再次刷新年付云服务器低价格。我们看到云服务器低至年79元,如果有需要便宜云服务器的...
horain怎么样?horain cloud是一家2019年成立的国人主机商家,隶属于北京辰帆科技有限公司,horain持有增值电信业务经营许可证(B1-20203595),与中国电信天翼云、腾讯云、华为云、UCloud、AWS等签署渠道合作协议,主要提企业和个人提供云服务器,目前商家推出了几款特价物理机,都是在内地,性价比不错,其中有目前性能比较强悍的AMD+NVMe系列。点击进入:horain...