پاسخها 13
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>css3</title>
<style>
@keyframes float {
0% {
transform: translate(0, 0); /* موقعیت اولیه */
}
50% {
transform: translate(10px, -10px); /* جابجایی کمی به سمت راست و بالا */
}
100% {
transform: translate(0, 0); /* بازگشت به موقعیت اولیه */
}
}
div {
background: #afafaf;
width: 200px;
height: 50px;
transition: 0.5s;
animation-name: float;
animation-delay: 3s;
animation-duration: 3s;
animation-fill-mode: forwards;
}
</style>
</head>
<body>
<div class="div"></div>
</body>
جواب شماره 1436
در حال دریافت نظرها…
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>انیمیشن شناور</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
background-color: #333;
}
h1 {
font-size: 2rem;
background: linear-gradient(to left, #2563eb, #7c3aed);
-webkit-background-clip: text;
background-clip: text;
color: transparent;
}
.float {
animation: float 3s ease-in-out infinite;
}
@keyframes float {
0%,
100% {
transform: translateY(0);
}
50% {
transform: translateY(-12px);
}
}
</style>
</head>
<body>
<h1 class="float">HelloWorld</h1>
</body>
</html>
جواب شماره 9127
در حال دریافت نظرها…
<!DOCTYPE html>
<html lang="fa">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>floating animation</title>
<style>
.floating{
animation: float 3s ease-in-out infinite ;
}
@keyframes float{
0%{
transform: translateY(0);
}
50%{
transform: translateY(-15px);
}
100%{
transform: translateY(0);
}
}
</style>
</head>
<body>
<div class="floating" style="width: 100px; background-color: blueviolet; border: 2px solid; float: right;">♥ </div>
<div class="floating" style="width: 100px; background-color: aqua ; border: 2px solid;">ј</div>
</body>
</html>
جواب شماره 3013
در حال دریافت نظرها…
ارسال جواب
جوابت را با Markdown بنویس و ثبت کن
×
حساب کاربری
برای استفاده از این بخش باید وارد حساب کاربریت بشی
ورود/ثبت نام
بستن
دانلود