使用 CSS Animation 为 Vertical-align 属性添加动画
cssweb developmentfront end technology更新于 2026/2/2 21:32:17
要使用 CSS 为 Vertical-align 属性添加动画,您可以尝试运行以下代码 −
示例
<!DOCTYPE html>
<html>
<head>
<style>
img {
vertical-align: 80px;
animation: myanim 3s;
}
@keyframes myanim {
50% {
vertical-align:120px;
}
}
</style>
</head>
<body>
<h1>CSS vertical-align property</h1>
<div></div>
<p><img src="https://www.cainiaomax.com/latest/microservice_architecture.png" width = "80" height = "80">
This is demo text. This is demo text. This is demo text. This is demo text.
</p>
</body>
</html>
相关文章
有用资源
css 参考教程 - 该教程包含有关 css 的更多信息:https://www.cainiaomax.com/css/

