كيف تصمم شريط اسم (Lower Third) متحركا للفيديو؟
شريط الاسم (Lower Third) يظهر أسفل الشاشة ليعرّف بالمتحدث باسمه ووظيفته، وهو أكثر عناصر الفيديو طلبا. نصممه بالعربية والإنجليزية في صفحة HTML، ثم نسجّله ونضيفه في برنامج المونتاج كما في مقالاتنا السابقة.
الخطوات
- اصنع إطارا بنسبة 16:9 (aspect-ratio: 16 / 9) وضع الشريط داخله بهامش من الحافة (متغير --margin) حتى لا يلتصق النص بالحافة. قيمة 6% هنا اختيار للتصميم وليست معيارا.
- ابنِ الشريط من خط ملون (bar) وصندوق نص فيه سطران: الاسم بالعربية والمسمى الوظيفي بالإنجليزية بـ dir="ltr" وlang="en".
- استخدم inset-inline-start لتثبيته عند بداية السطر: يظهر يمينا في العربية ويسارا في الإنجليزية بنفس الكود.
- حرّك الدخول بانزلاق قصير مع تلاشي، وأعطِ الخط الملون حركة scaleY مستقلة، ثم الخروج بعد بضع ثوان. اعكس اتجاه الانزلاق في RTL.
- سجّل الصفحة (OBS) وأضف الناتج في المونتاج كما في مقالة تسجيل الحركة، وتأكد من تباين الاسم مع الخلفية، ولا تجعل شيئا يومض أكثر من ثلاث مرات في الثانية.
- عند prefers-reduced-motion استبدل الانزلاق بتلاشي بسيط.
المصادر
- MDN: inset-inline-start خاصية منطقية تتبع اتجاه الكتابة: https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/inset-inline-start
- Tahrikit: ابدأ من حركة في قسم الفيديو، واضبط المسرح 16:9 بدقة 1920x1080، وسجّله بـ OBS: https://motion.velloxhq.com/en/learn/logo-youtube-intro-motions.html
- Tahrikit: سجّل الحركة كفيديو بأدوات مجانية: https://motion.velloxhq.com/en/learn/motion-in-canva-or-video.html
- W3C WCAG 2.2: لا شيء يومض أكثر من ثلاث مرات في الثانية: https://www.w3.org/WAI/WCAG22/Understanding/three-flashes-or-below-threshold.html
- MDN: prefers-reduced-motion يكشف إعداد الجهاز لتقليل الحركة غير الضرورية، وقيمة reduce تعني أنه مفعّل: https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-reduced-motion
الكود
HTML
<!doctype html>
<html lang="ar" dir="rtl">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<style>
:root { --margin: 6%; } /* keep text inside the frame edges */
body { margin: 0; background: #1f2937; font-family: system-ui, "Segoe UI", Tahoma, sans-serif; }
.frame { position: relative; width: min(100vw, 960px); aspect-ratio: 16 / 9; margin: 0 auto; overflow: hidden; background: linear-gradient(135deg, #334155, #0f172a); }
.lt { position: absolute; inset-inline-start: var(--margin); bottom: var(--margin); display: flex; align-items: stretch;
animation: in .7s cubic-bezier(.2,.8,.2,1) both, out .5s ease-in 4.5s forwards; }
.lt .bar { width: 8px; background: #38bdf8; transform-origin: bottom; animation: grow .5s ease-out both; }
.lt .txt { padding: .5rem 1.2rem; background: rgba(15,23,42,.88); color: #fff; clip-path: inset(0); }
.lt .name { font-size: clamp(1.1rem, 3.4vw, 2rem); font-weight: 800; line-height: 1.5; }
.lt .role { font-size: clamp(.8rem, 2.2vw, 1.2rem); color: #7dd3fc; line-height: 1.5; }
@keyframes in { from { opacity: 0; transform: translateX(calc(var(--dir, 1) * -40px)); } }
@keyframes out { to { opacity: 0; transform: translateX(calc(var(--dir, 1) * -40px)); } }
@keyframes grow { from { transform: scaleY(0); } }
[dir="rtl"] .lt { --dir: -1; }
@media (prefers-reduced-motion: reduce) {
.lt { animation: fade 3s both; } .lt .bar { animation: none; }
@keyframes fade { 0% { opacity: 0; } 15%, 85% { opacity: 1; } 100% { opacity: 0; } }
}
</style>
<div class="frame">
<div class="lt">
<div class="bar"></div>
<div class="txt">
<div class="name">شادي علي</div>
<div class="role" dir="ltr" lang="en">Shady Ali, Founder</div>
</div>
</div>
</div>
</html>لم تجد الحركة التي تريدها؟ اطلبها من هنا
مقالات ذات صلة: