答案 0 :(得分:0)
答案 1 :(得分:0)
是。你可以通过CSS过渡来完成它。
.fade {
opacity: 0;
transition: opacity .25s ease-in-out;
}
.fade:hover {
opacity: 1;
}
以下是一个示例:https://jsfiddle.net/x4dd500z/1/
答案 2 :(得分:0)
首先设置msgbox的属性,然后
对于褪色使用
msgbox {
opacity: 1;
}
msgbox:hover {
opacity: 0.75;
}
答案 3 :(得分:0)
这样的事情: - JSFiddle
HTML:
<div class="box">
<img src="http://placehold.it/100x100">
<span>Tooltip</span>
</div>
CSS
.box {
position:relative;
display:inline-block;
width:100px;
height:100px;
padding:2px;
border:1px solid #000;
margin:10px;
}
span {
position:absolute;
top:0;
left:0;
right:0;
width:100%;
padding:2px 0;
background-color:#000;
background-color:rgba(0,0,0,0.65);
color:#fff;
opacity:0;
transition: opacity .5s ease-in-out;
text-align:center;
font-family:Arial;
font-size:14px;
}
.box:hover span {
opacity:1;
}