为什么我的鼠标悬停按钮会在悬停时弹出?
Why is my rollover button popping on hover?
谁能知道为什么我的悬停时鼠标悬停弹出。我非常努力地尝试修复但是它呢?
我正在使用 css .hover 函数,请参见下面的示例。
任何建议或例子都会感谢我,thx stew
}
body {
background-color: grey;
background: url(http://wizzfree.com/pix/bg1.jpg) fixed;
background-size: 100% 100%;
background-repeat: no-repeat;
overflow: hidden;
margin: 0px;
font-family: Arial;
color: darkgrey;
font-size: 12px;
line-height: .3;
letter-spacing: .5px;
}
.call {
position: fixed;
top: 180px;
left: 50%;
width: 150px;
height:123px;
transform:translateX(-50%); /* center */
z-index: 3;
}
/*........ crossfade on buttons ........*/
.hover img{
transition:.3s;
position:absolute;
}
.nohover{
opacity:0;}
a:hover .hover{
opacity:0;
}
a:hover .nohover{
opacity:1;
}
.hover {
position: relative;
}
.hover img{
position: absolute;
}
<div class="call">
<a href="startchat.htm">
<img src="http://wizzfree.com/pix/call2.png" width="150" class="nohover">
<img src="http://wizzfree.com/pix/call3.png" width="150" class="hover"></a>
</div>
您已将 CSS wrongly.Replace 您的 CSS 写成以下内容。
body {
background-color: grey;
background: url(http://wizzfree.com/pix/bg1.jpg) fixed;
background-size: 100% 100%;
background-repeat: no-repeat;
overflow: hidden;
margin: 0px;
font-family: Arial;
color: darkgrey;
font-size: 12px;
line-height: .3;
letter-spacing: .5px;
}
.call {
position: fixed;
top: 180px;
left: 50%;
width: 150px;
height:123px;
transform:translateX(-50%); /* center */
z-index: 3;
}
.hover,.nohover{
transition:.3s;
position:absolute;
}
.nohover{
opacity:0;
}
a:hover .hover{
opacity:0;
}
a:hover .nohover{
opacity:1;
}body {
background-color: grey;
background: url(http://wizzfree.com/pix/bg1.jpg) fixed;
background-size: 100% 100%;
background-repeat: no-repeat;
overflow: hidden;
margin: 0px;
font-family: Arial;
color: darkgrey;
font-size: 12px;
line-height: .3;
letter-spacing: .5px;
}
.call {
position: fixed;
top: 180px;
left: 50%;
width: 150px;
height:123px;
transform:translateX(-50%); /* center */
z-index: 3;
}
.hover,.nohover{
transition:.3s;
position:absolute;
}
.nohover{
opacity:0;
}
a:hover .hover{
opacity:0;
}
a:hover .nohover{
opacity:1;
}
<div class="call">
<a href="startchat.htm">
<img src="http://wizzfree.com/pix/call2.png" width="150" class="nohover">
<img src="http://wizzfree.com/pix/call3.png" width="150" class="hover"></a>
</div>
谁能知道为什么我的悬停时鼠标悬停弹出。我非常努力地尝试修复但是它呢? 我正在使用 css .hover 函数,请参见下面的示例。 任何建议或例子都会感谢我,thx stew
}
body {
background-color: grey;
background: url(http://wizzfree.com/pix/bg1.jpg) fixed;
background-size: 100% 100%;
background-repeat: no-repeat;
overflow: hidden;
margin: 0px;
font-family: Arial;
color: darkgrey;
font-size: 12px;
line-height: .3;
letter-spacing: .5px;
}
.call {
position: fixed;
top: 180px;
left: 50%;
width: 150px;
height:123px;
transform:translateX(-50%); /* center */
z-index: 3;
}
/*........ crossfade on buttons ........*/
.hover img{
transition:.3s;
position:absolute;
}
.nohover{
opacity:0;}
a:hover .hover{
opacity:0;
}
a:hover .nohover{
opacity:1;
}
.hover {
position: relative;
}
.hover img{
position: absolute;
}
<div class="call">
<a href="startchat.htm">
<img src="http://wizzfree.com/pix/call2.png" width="150" class="nohover">
<img src="http://wizzfree.com/pix/call3.png" width="150" class="hover"></a>
</div>
您已将 CSS wrongly.Replace 您的 CSS 写成以下内容。
body {
background-color: grey;
background: url(http://wizzfree.com/pix/bg1.jpg) fixed;
background-size: 100% 100%;
background-repeat: no-repeat;
overflow: hidden;
margin: 0px;
font-family: Arial;
color: darkgrey;
font-size: 12px;
line-height: .3;
letter-spacing: .5px;
}
.call {
position: fixed;
top: 180px;
left: 50%;
width: 150px;
height:123px;
transform:translateX(-50%); /* center */
z-index: 3;
}
.hover,.nohover{
transition:.3s;
position:absolute;
}
.nohover{
opacity:0;
}
a:hover .hover{
opacity:0;
}
a:hover .nohover{
opacity:1;
}body {
background-color: grey;
background: url(http://wizzfree.com/pix/bg1.jpg) fixed;
background-size: 100% 100%;
background-repeat: no-repeat;
overflow: hidden;
margin: 0px;
font-family: Arial;
color: darkgrey;
font-size: 12px;
line-height: .3;
letter-spacing: .5px;
}
.call {
position: fixed;
top: 180px;
left: 50%;
width: 150px;
height:123px;
transform:translateX(-50%); /* center */
z-index: 3;
}
.hover,.nohover{
transition:.3s;
position:absolute;
}
.nohover{
opacity:0;
}
a:hover .hover{
opacity:0;
}
a:hover .nohover{
opacity:1;
}
<div class="call">
<a href="startchat.htm">
<img src="http://wizzfree.com/pix/call2.png" width="150" class="nohover">
<img src="http://wizzfree.com/pix/call3.png" width="150" class="hover"></a>
</div>