在CSS最大宽度上执行动画
要使用CSS在max-width属性上实现动画,您可以尝试运行以下代码
示例
<!DOCTYPE html>
<html>
<head>
<style>
div {
overflow: auto;
background-color: blue;
color: white;
border: 1px solid black;
animation: myanim 3s;
}
@keyframes myanim {
30% {
max-width: 250px;
}
}
</style>
</head>
<body>
<h1>Example of max-width</h1>
<div>
<p>This is demo text. This is demo text. This is demo text.
This is demo text. This is demo text. This is demo text.
This is demo text. This is demo text. This is demo text.
This is demo text. This is demo text. This is demo text.
This is demo text. This is demo text. This is demo text.
This is demo text. This is demo text. This is demo text.
This is demo text. This is demo text. This is demo text.
</p>
</div>
</body>
</html>热门推荐
10 幼儿住院祝福语老师简短
11 生日祝福语贺卡老师简短
12 猪年幽默祝福语简短
13 六一加端午祝福语简短
14 恭喜新郎父母简短祝福语
15 古风中考祝福语简短
16 毕业祝福语保安文案简短
17 档案调动孩子祝福语简短
18 下雪路滑祝福语简短