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

织梦DEDECMS即将授权收费和维权模式 站长应对的几个方法

这两天在站长群里看到不少有使用DEDECMS织梦程序的朋友比较着急,因为前两天有看到来自DEDECMS,我们熟悉的织梦程序官方发布的公告,将会在10月25日开始全面商业用途的使用DEDECMS内容管理程序的会采用授权收费模式,如果我们有在个人或者企业商业用途的,需要联系且得到授权才可以使用,否则后面会通过维权的方式。对于这个事情,我们可能有些站长经历过,比如字体、图片的版权。以及有一些国内的CMS...

新加坡云服务器 1核2Gg 46元/月 香港云服务器 1核2G 74元/月 LightNode

LightNode是一家成立于2002年,总部位于香港的VPS服务商。提供基于KVM虚拟化技术.支持CentOS、Ubuntu或者Windows等操作系统。公司名:厦门靠谱云股份有限公司官方网站:https://www.lightnode.com拥有高质量香港CN2 GIA与东南亚节点(河内、曼谷、迪拜等)。最低月付7.71美金,按时付费,可随时取消。灵活满足开发建站、游戏应用、外贸电商等需求。首...

CloudCone,美国洛杉矶独立服务器特价优惠,美国洛杉矶MC机房,100Mbps带宽不限流量,可选G口,E3-1270 v2处理器32G内存1Gbps带宽,69美元/月

今天CloudCone发布了最新的消息,推送了几款特价独立服务器/杜甫产品,美国洛杉矶MC机房,分配100Mbps带宽不限流量,可以选择G口限制流量计划方案,存储分配的比较大,选择HDD硬盘的话2TB起,MC机房到大陆地区线路还不错,有需要美国特价独立服务器的朋友可以关注一下。CloudCone怎么样?CloudCone服务器好不好?CloudCone值不值得购买?CloudCone是一家成立于2...

鼠标图片为你推荐
投标人chrome桂林飞宇科技股份有限公司V1.2支持ipad支持ipad支持ipad司机苹果5tracerouteLinux 下traceroute的工作原理是什么 !ipad如何上网ipad怎么设置网络?勒索病毒win7补丁求问win7 64位旗舰版怎么预防勒索病毒iphone连不上wifi苹果手机为什么突然连不上家里的wifi?
域名解析文件 5折 awardspace 香港托管 softbank官网 外国空间 京东商城0元抢购 100x100头像 godaddy域名证书 有益网络 seednet 91vps 傲盾官网 100mbps 能外链的相册 独立主机 贵阳电信 广州主机托管 alexa世界排名 godaddy退款 更多