我有一个脱节的翻转,我想添加一个定时缓出(仅限)效果。 我制作了一个页面,仅隔离了该特定问题,请参见此处:
当悬停在“概览”上时,概览图像会显示在定义的区域中,并且在展开时图像会消失。一切都很好,但我现在希望图像在半秒后淡出,即使指针仍然悬停在“概述”上(不仅仅是指针熄灭时)。换句话说,每次访问者将鼠标悬停在“概览”上时,图像都会出现半秒钟然后淡出。我是新手。只有 CSS 会很棒。我尝试了 webkit 缓出/缓入,但不能真正让它显示,然后只能缓出。
编码:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>raphaelzwyer</title>
<link href="css/raphaelzwyer.css" type="text/css" media="screen" title="raphaelzwyer stylesheet" rel="stylesheet" charset="utf-8"/>
<script type="text/javascript" src="js/raphaelzwyerFive.js"></script>
</head>
<body>
<div id="header">
<ul id="overviewlayer">
<li>
<a href="portfolio.html">
<div id="overviewtext">overview</div>
<div class="overview"><img src="images/overview.png" width="660" height="1284" alt="overviewlayer"/></div>
</a>
</li>
<li id="wordmark"></li>
</ul> <!-- end of overviewlayer -->
</div> <!-- end of header -->
</body>
</html>
相关的CSS:
#header {
position: relative;
top: 36px;
left: 212px;
width: 660px;
height: 48px;}
#overviewlayer a .overview {
display:none;}
#overviewlayer a:hover .overview {
display: block;
position: absolute;
top: 116px;
left: 0px;
height: 852px;
width: 660px;
padding: 0px;
margin: 0px;
color: #000;
font-size: 11px;
background-color: #FFF;
z-index: +20;}
.overview {
position: relative;
top: 12px;
left: 0px;
height: 852px;
width: 660px;
z-index: +10;}
#overviewtext {
position: absolute;
top: 0px;
width: 100px;
height: 48px;
padding-top: 4px;
border-top-style: solid;
border-top-width: 1px;
z-index: +600;}
a {
text-decoration: none;
color: #a9a9a9;}
a:hover, a:focus {
text-decoration: none;
color: #be1f2d;}
li {
list-style-type: none;
display: inline;}