【发布时间】:2019-09-19 09:51:47
【问题描述】:
我想淡出一个词,然后淡入另一个词,但问题是它似乎又回来了
我尝试将不透明度从 1 设置为 0,但它不起作用
animation: fadeout 5s;
}
@keyframes fadeout
{
from{opacity: 1;}
to {opacity: 0;
}
}
.fade-in{
animation: fadein 5s;
}
@keyframes fadein
{
from{opacity: 0;}
to {opacity: 1;}
}
html{background-color: white}
<!DOCTYPE html>
<html>
<head>
<title>welcom</title>
<link rel="stylesheet" type="text/css" href="welc.css" >
</head>
<body>
<center>
<font class='fade-out' size="30"> hello </font>
<font class='fade-in' size="30"> do you like pandas?</font>
</center>
</body>
</html>
我想让 (hello) 完全淡出,让 (do you like pandas) 淡入
【问题讨论】:
-
您在 {opacity:0; 之后缺少一个右括号