mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-11-16 14:27:26 +00:00
style: format fixture HTML files
This commit is contained in:
@@ -1,19 +1,41 @@
|
||||
<template id="intro-template">
|
||||
<div id="intro" data-composition-id="intro" data-width="1920" data-height="1080">
|
||||
<div class="title" style="position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);font-size:120px;font-family:Impact,sans-serif;color:#fff;opacity:0;">HELLO WORLD</div>
|
||||
<div
|
||||
class="title"
|
||||
style="
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
font-size: 120px;
|
||||
font-family: Impact, sans-serif;
|
||||
color: #fff;
|
||||
opacity: 0;
|
||||
"
|
||||
>
|
||||
HELLO WORLD
|
||||
</div>
|
||||
<style>
|
||||
#intro { position:relative; width:1920px; height:1080px; background:#111; }
|
||||
#intro {
|
||||
position: relative;
|
||||
width: 1920px;
|
||||
height: 1080px;
|
||||
background: #111;
|
||||
}
|
||||
</style>
|
||||
<script src="https://cdn.jsdelivr.net/npm/gsap@3.14.2/dist/gsap.min.js"></script>
|
||||
<script>
|
||||
(function() {
|
||||
(function () {
|
||||
window.__timelines = window.__timelines || {};
|
||||
var tl = gsap.timeline({ paused: true });
|
||||
var scope = '#intro';
|
||||
tl.fromTo(scope + ' .title',
|
||||
var scope = "#intro";
|
||||
tl.fromTo(
|
||||
scope + " .title",
|
||||
{ opacity: 0, y: 50, scale: 0.8 },
|
||||
{ opacity: 1, y: 0, scale: 1, duration: 0.5, ease: 'power3.out' }, 0.2);
|
||||
window.__timelines['intro'] = tl;
|
||||
{ opacity: 1, y: 0, scale: 1, duration: 0.5, ease: "power3.out" },
|
||||
0.2,
|
||||
);
|
||||
window.__timelines["intro"] = tl;
|
||||
})();
|
||||
</script>
|
||||
</div>
|
||||
|
||||
@@ -1,21 +1,48 @@
|
||||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<script src="https://cdn.jsdelivr.net/npm/gsap@3.14.2/dist/gsap.min.js"></script>
|
||||
<style>
|
||||
body { margin: 0; width: 1920px; height: 1080px; overflow: hidden; background: #000; }
|
||||
.scene { position: absolute; inset: 0; overflow: hidden; }
|
||||
#scene-intro { opacity: 1; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="root" data-composition-id="main" data-start="0" data-duration="4" data-width="1920" data-height="1080">
|
||||
<div id="scene-intro" class="scene" data-composition-id="intro" data-composition-src="intro.html" data-start="0" data-duration="4" data-track-index="0"></div>
|
||||
</div>
|
||||
<script>
|
||||
window.__timelines = window.__timelines || {};
|
||||
window.__timelines["main"] = gsap.timeline({ paused: true });
|
||||
</script>
|
||||
</body>
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<script src="https://cdn.jsdelivr.net/npm/gsap@3.14.2/dist/gsap.min.js"></script>
|
||||
<style>
|
||||
body {
|
||||
margin: 0;
|
||||
width: 1920px;
|
||||
height: 1080px;
|
||||
overflow: hidden;
|
||||
background: #000;
|
||||
}
|
||||
.scene {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
#scene-intro {
|
||||
opacity: 1;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div
|
||||
id="root"
|
||||
data-composition-id="main"
|
||||
data-start="0"
|
||||
data-duration="4"
|
||||
data-width="1920"
|
||||
data-height="1080"
|
||||
>
|
||||
<div
|
||||
id="scene-intro"
|
||||
class="scene"
|
||||
data-composition-id="intro"
|
||||
data-composition-src="intro.html"
|
||||
data-start="0"
|
||||
data-duration="4"
|
||||
data-track-index="0"
|
||||
></div>
|
||||
</div>
|
||||
<script>
|
||||
window.__timelines = window.__timelines || {};
|
||||
window.__timelines["main"] = gsap.timeline({ paused: true });
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user