使用 CSS 动画设置垂直对齐属性
要使用 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://tutorialspoint.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>
广告
数据结构
网络
RDBMS
操作系统
Java
iOS
HTML
CSS
Android
Python
C 编程
C++
C#
MongoDB
MySQL
Javascript
PHP