图标鼠标经过图片变色代码实例(Mouse color change through the picture code examples)

鼠标图片  时间:2021-04-19  阅读:()

鼠标经过图片变色代码实例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

LOCVPS:VPS主机全场8折,德国/荷兰/美国KVM终身7折

LOCVPS发来了针对元旦新年的促销活动,除了全场VPS主机8折优惠外,针对德国/荷兰KVM #1/美国KVM#2 VPS提供终身7折优惠码(限量50名,先到先得)。LOCVPS是一家成立于2012年的国人VPS服务商,提供中国香港、韩国、美国、日本、新加坡、德国、荷兰、俄罗斯等地区VPS服务器,基于KVM或XEN架构(推荐优先选择KVM),均选择直连或者优化线路,国内延迟低,适合建站或远程办公使...

触摸云 26元/月 ,美国200G高防云服务器

触摸云触摸云(cmzi.com),国人商家,有IDC/ISP正规资质,主营香港线路VPS、物理机等产品。本次为大家带上的是美国高防2区的套餐。去程普通线路,回程cn2 gia,均衡防御速度与防御,防御值为200G,无视UDP攻击,可选择性是否开启CC防御策略,超过峰值黑洞1-2小时。最低套餐20M起,多数套餐为50M,适合有防御型建站需求使用。美国高防2区 弹性云[大宽带]· 配置:1-16核· ...

ZJI:韩国BGP+CN2线路服务器,国内三网访问速度优秀,8折优惠码每月实付440元起

zji怎么样?zji最近新上韩国BGP+CN2线路服务器,国内三网访问速度优秀,适用8折优惠码zji,优惠后韩国服务器最低每月440元起。zji主机支持安装Linux或者Windows操作系统,会员中心集成电源管理功能,8折优惠码为终身折扣,续费同价,全场适用。ZJI是原Wordpress圈知名主机商:维翔主机,成立于2011年,2018年9月启用新域名ZJI,提供中国香港、台湾、日本、美国独立服...

鼠标图片为你推荐
支持ipad支持ipad齐鲁工业大学高水平学科建设专项photoshop技术photoshop技术对哪些工作有用?勒索病毒win7补丁怎么删除 防勒索病毒 打的补丁canvas2Canvas ~セピア色のモチーフ~ 这个动画片的中文翻译是什么?从哪看?联通版iphone4s怎么知道到苹果4s是联通版,还是移动版迅雷快鸟迅雷快鸟支持移动宽带提速吗css3按钮html点击按钮怎么弹出一个浮动的窗体fastreport2.5AMD Athlon 2.5+GHZ是什么意思?
美国服务器托管 台湾虚拟主机 域名升级访问 高防服务器租用 过期域名查询 服务器配置技术网 堪萨斯服务器 arvixe 外国服务器 免费个人博客 主机合租 500m空间 韩国网名大全 京东商城双十一活动 howfile 183是联通还是移动 免费防火墙 东莞数据中心 vip购优惠 重庆双线服务器托管 更多