プロジェクトの準備
プロジェクト開発ツール
Visual Studio コード 1.44.2
バージョン: 1.44.2
コミット: ff915844119ce9485abfe8aa9076ec76b5300ddd
日付: 2020-04-16T16:36:23.138Z
Electron: 7.1.11
Chrome: 78.0.3904.130
Node.js: 12.8.1
V 8 : 7.8.279.23-電子.0
OS: Windows_NT x64 10.0.19044
プロジェクトの構造
Index.htmlのコードは次のとおりです
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>图片上下移动</title>
<style>
img {
animation: up .5s infinite;
}
@keyframes up {
to {
margin-top: 200px;
}
}
</style>
</head>
<body>
<img src="./images/1.jpg" alt="">
</body>
</html>
要約する
このコードは、画像の下方向への無限反復表示効果を実現し、画像にダイナミックな効果を与えることができます html+css 135 に基づいた画像表示。