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

wordpress高级跨屏企业主题 wordpress绿色企业自适应主题

wordpress高级跨屏企业主题,通用响应式跨平台站点开发,自适应PC端+各移动端屏幕设备,高级可视化自定义设置模块+高效的企业站搜索优化。wordpress绿色企业自适应主题采用标准的HTML5+CSS3语言开发,兼容当下的各种主流浏览器: IE 6+(以及类似360、遨游等基于IE内核的)、Firefox、Google Chrome、Safari、Opera等;同时支持移动终端的常用浏览器应...

青云互联:香港安畅CN2弹性云限时首月五折,15元/月起,可选Windows/可自定义配置

青云互联怎么样?青云互联是一家成立于2020年的主机服务商,致力于为用户提供高性价比稳定快速的主机托管服务,目前提供有美国免费主机、香港主机、韩国服务器、香港服务器、美国云服务器,香港安畅cn2弹性云限时首月五折,15元/月起;可选Windows/可自定义配置,让您的网站高速、稳定运行。点击进入:青云互联官方网站地址青云互联优惠码:八折优惠码:ltY8sHMh (续费同价)青云互联香港云服务器活动...

2021年7月最新洛杉矶CN2/香港CN2 vps套餐及搬瓦工优惠码 循环终身优惠6.58%

搬瓦工怎么样?2021年7月最新vps套餐推荐及搬瓦工优惠码整理,搬瓦工优惠码可以在购买的时候获取一些优惠,一般来说力度都在 6% 左右。本文整理一下 2021 年 7 月最新的搬瓦工优惠码,目前折扣力度最大是 6.58%,并且是循环折扣,续费有效,可以一直享受优惠价格续费的。搬瓦工优惠码基本上可能每年才会更新一次,大家可以收藏本文,会保持搬瓦工最新优惠码更新的。点击进入:搬瓦工最新官方网站搬瓦工...

鼠标图片为你推荐
Committeesios11清华大学经济管理学院空调iphone支持ipad支持ipad支持ipadcss3圆角如何用CSS实现圆角矩形?tracerouteping命令和traceroute(tracert )在功能上的区别有哪些?勒索病毒win7补丁怎么删除 防勒索病毒 打的补丁联通版iphone4s怎样看苹果4S是联通版还是电信版
网络域名 绍兴服务器租用 视频空间租用 中国域名网 hostmaster 国内免备案主机 hkbn 加勒比群岛 java主机 美国便宜货网站 新世界电讯 12u机柜尺寸 windows2003iso 商务主机 panel1 双拼域名 工信部icp备案号 工作站服务器 空间技术网 raid10 更多