|
@@ -7,287 +7,316 @@
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
<title>Ai_anchor_Features</title>
|
|
|
|
|
|
- <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-F3w7mX95PdgyTmZZMECAngseQB83DfGTowi0iMjiWaeVhAn4FJkqJByhZMI3AhiU" crossorigin="anonymous">
|
|
|
+ <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.1/dist/css/bootstrap.min.css" rel="stylesheet"
|
|
|
+ integrity="sha384-F3w7mX95PdgyTmZZMECAngseQB83DfGTowi0iMjiWaeVhAn4FJkqJByhZMI3AhiU" crossorigin="anonymous">
|
|
|
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.13/css/all.css"
|
|
|
- integrity="sha384-DNOHZ68U8hZfKXOrtjWvjxusGo9WQnrNx2sqG0tfsghAvtVlRW3tvkXWZh58N9jp" crossorigin="anonymous">
|
|
|
+ integrity="sha384-DNOHZ68U8hZfKXOrtjWvjxusGo9WQnrNx2sqG0tfsghAvtVlRW3tvkXWZh58N9jp" crossorigin="anonymous">
|
|
|
|
|
|
<link rel="stylesheet" href="./style.css">
|
|
|
</head>
|
|
|
|
|
|
<body id="top">
|
|
|
-<div style="overflow: hidden; position: relative;">
|
|
|
- <div class="row px-0 mx-0">
|
|
|
- <div class="col-lg-2 px-0">
|
|
|
- <div class="card border-0">
|
|
|
- <img style="width:14vw;" src="./img/about/home_六角.png" alt="...">
|
|
|
- <div class="card-img-overlay d-flex justify-content-center align-items-center">
|
|
|
- <div>
|
|
|
- <a href="./index.html">
|
|
|
- <img class="home-btn"
|
|
|
- style="width: 70px; position: relative; right:1.5vw; bottom:20px;"
|
|
|
- src="./img/about/home_黑.png" alt="">
|
|
|
- </a>
|
|
|
+ <div style="overflow: hidden; position: relative;">
|
|
|
+ <div class="row px-0 mx-0">
|
|
|
+ <div class="col-lg-2 px-0">
|
|
|
+ <div class="card border-0">
|
|
|
+ <img style="width:14vw;" src="./img/about/home_六角.png" alt="...">
|
|
|
+ <div class="card-img-overlay d-flex justify-content-center align-items-center">
|
|
|
+ <div>
|
|
|
+ <a href="./index.html">
|
|
|
+ <img class="home-btn" style="width: 70px; position: relative; right:1.5vw; bottom:20px;"
|
|
|
+ src="./img/about/home_黑.png" alt="">
|
|
|
+ </a>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div class="col-lg-9 px-0">
|
|
|
- <div class="card border-0">
|
|
|
- <img style="position: relative; right:20px;" class="img-fluid" src="./img/about/Bar.png"
|
|
|
- alt="">
|
|
|
- <div class="card-img-overlay">
|
|
|
- <div class="mt-3 me-2">
|
|
|
- <h1 style="font-size:3rem;" class="fw-bold mb-0 text-white">簡介</h1>
|
|
|
+ <div class="col-lg-9 px-0">
|
|
|
+ <div class="card border-0">
|
|
|
+ <img style="position: relative; right:20px;" class="img-fluid" src="./img/about/Bar.png" alt="">
|
|
|
+ <div class="card-img-overlay">
|
|
|
+ <div class="mt-3 me-2">
|
|
|
+ <h1 style="font-size:3rem;" class="fw-bold mb-0 text-white">簡介</h1>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div class="col-lg-1 px-0">
|
|
|
- <!-- <nav style="margin-top: 40px;" class="navbar"> -->
|
|
|
+ <div class="col-lg-1 px-0">
|
|
|
+ <!-- <nav style="margin-top: 40px;" class="navbar"> -->
|
|
|
<div style="margin-top: 40px;">
|
|
|
<ul style="float: left;" class="navbar-nav mb-2 mb-lg-0 me-3">
|
|
|
<li class="nav-item dropdown">
|
|
|
- <a class="nav-link dropdown-toggle" style="font-size: 18px;" href="#" id="navbarDropdown" role="button"
|
|
|
- data-bs-toggle="dropdown" aria-expanded="false">
|
|
|
+ <a class="nav-link dropdown-toggle" style="font-size: 18px;" href="#" id="navbarDropdown"
|
|
|
+ role="button" data-bs-toggle="dropdown" aria-expanded="false">
|
|
|
中/En
|
|
|
</a>
|
|
|
<ul class="dropdown-menu" aria-labelledby="navbarDropdown">
|
|
|
<li><button class="nav-link lan-switch" aria-current="page" set-lan="html:en"
|
|
|
- onclick="changeLan(this);window.location.reload();"
|
|
|
- value="en">English</button>
|
|
|
+ onclick="changeLan(this);window.location.reload();" value="en">English</button>
|
|
|
</li>
|
|
|
<li><button class="nav-link lan-switch" aria-current="page" set-lan="html:zh"
|
|
|
- onclick="changeLan(this);window.location.reload();"
|
|
|
- value="zh">中文</button></li>
|
|
|
+ onclick="changeLan(this);window.location.reload();" value="zh">中文</button></li>
|
|
|
</ul>
|
|
|
</li>
|
|
|
</ul>
|
|
|
<div style="float: left;" class="me-auto mt-2">
|
|
|
<a id="expand" onclick="openFullscreen();" style="cursor: pointer;" class="border-0"><i
|
|
|
- style="font-size: 18px;" class="fas fa-expand text-dark"></i></a>
|
|
|
- <a id="compression" onclick="closeFullscreen();" style="cursor: pointer;"
|
|
|
- class="border-0"><i class="fas fa-compress text-dark"></i></a>
|
|
|
+ style="font-size: 18px;" class="fas fa-expand text-dark"></i></a>
|
|
|
+ <a id="compression" onclick="closeFullscreen();" style="cursor: pointer;" class="border-0"><i
|
|
|
+ class="fas fa-compress text-dark"></i></a>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <!-- </nav> -->
|
|
|
+ <!-- </nav> -->
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <section class="sec-features" id="sec-features">
|
|
|
-
|
|
|
- <div class="container text-center">
|
|
|
- <!-- <h2 class="features-title"><strong>4</strong><lan set-lan="html:feature">大特色</lan></h2> -->
|
|
|
- <div class="row" style="position: relative;">
|
|
|
- <div class="col-xs-12 col-md-6 col-lg-6">
|
|
|
- <div class="features-imgfr">
|
|
|
- <video autoplay muted loop>
|
|
|
- <source src="img/官網1_加速.mp4" type="video/mp4">
|
|
|
- </video>
|
|
|
+ <section class="sec-features" id="sec-features">
|
|
|
+
|
|
|
+ <div class="container text-center">
|
|
|
+ <!-- <h2 class="features-title"><strong>4</strong><lan set-lan="html:feature">大特色</lan></h2> -->
|
|
|
+ <div class="row" style="position: relative;">
|
|
|
+ <div class="col-xs-12 col-md-6 col-lg-6">
|
|
|
+ <div class="features-imgfr">
|
|
|
+ <video autoplay muted loop>
|
|
|
+ <source src="img/官網1_加速.mp4" type="video/mp4">
|
|
|
+ </video>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div class="col-xs-12 col-md-6 col-lg-6 features-col">
|
|
|
- <div>
|
|
|
- <!-- <span class="features-num">1</span> -->
|
|
|
- <div class="row px-0 mx-0 mt-0">
|
|
|
- <div class="col-lg-4 pe-0">
|
|
|
- <img width="154" class="img-fluid" src="./img/组 6.png" alt="">
|
|
|
- </div>
|
|
|
- <div class="col-lg-8 ps-0">
|
|
|
- <div style="margin-top: 100px;">
|
|
|
- <h3 class="text-start" ><lan set-lan="html:feature_no1_title1">輸入文字腳本及素材</lan><br><lan set-lan="html:feature_no1_title2">一鍵輸出合成影片</lan></h3>
|
|
|
- <ul class="features-list">
|
|
|
- <li set-lan="html:feature_no1_li1">只需等待數分鐘即產製完成</li>
|
|
|
- <li set-lan="html:feature_no1_li2">可上傳圖片或是影片作為背景</li>
|
|
|
- <li set-lan="html:feature_no1_li3">生成MP4檔</li>
|
|
|
- </ul>
|
|
|
+ <div class="col-xs-12 col-md-6 col-lg-6 features-col">
|
|
|
+ <div>
|
|
|
+ <!-- <span class="features-num">1</span> -->
|
|
|
+ <div class="row px-0 mx-0 mt-0">
|
|
|
+ <div class="col-lg-4 pe-0">
|
|
|
+ <img width="154" class="img-fluid" src="./img/组 6.png" alt="">
|
|
|
+ </div>
|
|
|
+ <div class="col-lg-8 ps-0">
|
|
|
+ <div style="margin-top: 100px;">
|
|
|
+ <h3 class="text-start">
|
|
|
+ <lan set-lan="html:feature_no1_title1">輸入文字腳本及素材</lan><br>
|
|
|
+ <lan set-lan="html:feature_no1_title2">一鍵輸出合成影片</lan>
|
|
|
+ </h3>
|
|
|
+ <ul class="features-list">
|
|
|
+ <li set-lan="html:feature_no1_li1">只需等待數分鐘即產製完成</li>
|
|
|
+ <li set-lan="html:feature_no1_li2">可上傳圖片或是影片作為背景</li>
|
|
|
+ <li set-lan="html:feature_no1_li3">生成MP4檔</li>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div class="row" style="position: relative;">
|
|
|
- <div class="col-xs-12 col-md-6 features-col">
|
|
|
- <div>
|
|
|
- <!-- <span class="features-num">2</span> -->
|
|
|
- <div class="row px-0 mx-0 mt-0">
|
|
|
- <div class="col-lg-8 d-flex justify-content-end">
|
|
|
- <div style="margin-top: 100px;">
|
|
|
- <h3 set-lan="html:feature_no2_title">多位AI虛擬人物選擇</h3>
|
|
|
- <ul class="features-list">
|
|
|
- <li set-lan="html:feature_no2_li1">無人物肖像權問題</li>
|
|
|
- <li set-lan="html:feature_no2_li2">人物表情、動作自然</li>
|
|
|
- <li set-lan="html:feature_no2_li3">因應主題,選擇合適人物</li>
|
|
|
- </ul>
|
|
|
+ <div class="row" style="position: relative;">
|
|
|
+ <div class="col-xs-12 col-md-6 features-col">
|
|
|
+ <div>
|
|
|
+ <!-- <span class="features-num">2</span> -->
|
|
|
+ <div class="row px-0 mx-0 mt-0">
|
|
|
+ <div class="col-lg-8 d-flex justify-content-end">
|
|
|
+ <div style="margin-top: 100px;">
|
|
|
+ <h3 set-lan="html:feature_no2_title">多位AI虛擬人物選擇</h3>
|
|
|
+ <ul class="features-list">
|
|
|
+ <li set-lan="html:feature_no2_li1">無人物肖像權問題</li>
|
|
|
+ <li set-lan="html:feature_no2_li2">人物表情、動作自然</li>
|
|
|
+ <li set-lan="html:feature_no2_li3">因應主題,選擇合適人物</li>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="col-lg-4">
|
|
|
+ <img class="img-fluid" width="154" src="./img/组 7.png" alt="">
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div class="col-lg-4">
|
|
|
- <img class="img-fluid" width="154" src="./img/组 7.png" alt="">
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div class="col-xs-12 col-md-6 d-block">
|
|
|
- <div class="features-imgfr">
|
|
|
- <video autoplay muted loop>
|
|
|
- <source src="img/官網2.mp4" type="video/mp4">
|
|
|
- </video>
|
|
|
+ <div class="col-xs-12 col-md-6 d-block">
|
|
|
+ <div class="features-imgfr">
|
|
|
+ <video autoplay muted loop>
|
|
|
+ <source src="img/官網2.mp4" type="video/mp4">
|
|
|
+ </video>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
-
|
|
|
- <!-- <div class="col-xs-12 col-md-6 d-md-block">
|
|
|
+
|
|
|
+ <!-- <div class="col-xs-12 col-md-6 d-md-block">
|
|
|
<div class="features-imgfr">
|
|
|
<video autoplay muted loop>
|
|
|
<source src="img/官網2.mp4" type="video/mp4">
|
|
|
</video>
|
|
|
</div>
|
|
|
</div> -->
|
|
|
- </div>
|
|
|
- <div class="row" style="position: relative;">
|
|
|
- <div class="col-xs-12 col-md-6">
|
|
|
- <div class="features-imgfr">
|
|
|
- <video autoplay muted loop>
|
|
|
- <source src="img/官網3.mp4" type="video/mp4">
|
|
|
- </video>
|
|
|
- </div>
|
|
|
</div>
|
|
|
- <div class="col-xs-12 col-md-6 features-col">
|
|
|
-
|
|
|
- <div>
|
|
|
- <!-- <span class="features-num">3</span> -->
|
|
|
- <div class="row px-0 mx-0 mt-0">
|
|
|
- <div class="col-lg-4">
|
|
|
- <img width="154" class="img-fluid" src="./img/组 8.png" alt="">
|
|
|
- </div>
|
|
|
- <div class="col-lg-8">
|
|
|
- <div style="margin-top: 100px;">
|
|
|
- <h3 class="text-start" set-lan="html:feature_no3_title">投影片轉製為影片</h3>
|
|
|
- <ul class="features-list">
|
|
|
- <li set-lan="html:feature_no3_li1">輸入文字腳本及投影片連結
|
|
|
- <br>一鍵完成影片
|
|
|
- </li>
|
|
|
- <li set-lan="html:feature_no3_li2">生成MP4檔</li>
|
|
|
- </ul>
|
|
|
+ <div class="row" style="position: relative;">
|
|
|
+ <div class="col-xs-12 col-md-6">
|
|
|
+ <div class="features-imgfr">
|
|
|
+ <video autoplay muted loop>
|
|
|
+ <source src="img/官網3.mp4" type="video/mp4">
|
|
|
+ </video>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="col-xs-12 col-md-6 features-col">
|
|
|
+
|
|
|
+ <div>
|
|
|
+ <!-- <span class="features-num">3</span> -->
|
|
|
+ <div class="row px-0 mx-0 mt-0">
|
|
|
+ <div class="col-lg-4">
|
|
|
+ <img width="154" class="img-fluid" src="./img/组 8.png" alt="">
|
|
|
+ </div>
|
|
|
+ <div class="col-lg-8">
|
|
|
+ <div style="margin-top: 100px;">
|
|
|
+ <h3 class="text-start" set-lan="html:feature_no3_title">投影片轉製為影片</h3>
|
|
|
+ <ul class="features-list">
|
|
|
+ <li set-lan="html:feature_no3_li1">輸入文字腳本及投影片連結
|
|
|
+ <br>一鍵完成影片
|
|
|
+ </li>
|
|
|
+ <li set-lan="html:feature_no3_li2">生成MP4檔</li>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div class="row" style="position: relative;">
|
|
|
- <div class="col-xs-12 col-md-6 features-col">
|
|
|
- <div>
|
|
|
- <!-- <span class="features-num">4</span> -->
|
|
|
- <div class="row px-0 mx-0 mt-0">
|
|
|
- <div class="col-lg-8 d-flex justify-content-end">
|
|
|
- <div style="margin-top: 100px;">
|
|
|
- <h3 set-lan="html:feature_no4_title">多語言支援</h3>
|
|
|
- <ul class="features-list">
|
|
|
- <li set-lan="html:feature_no4_li1">支援中英文內容</li>
|
|
|
- <li set-lan="html:feature_no4_li2">可加入字幕</li>
|
|
|
- </ul>
|
|
|
+ <div class="row" style="position: relative;">
|
|
|
+ <div class="col-xs-12 col-md-6 features-col">
|
|
|
+ <div>
|
|
|
+ <!-- <span class="features-num">4</span> -->
|
|
|
+ <div class="row px-0 mx-0 mt-0">
|
|
|
+ <div class="col-lg-8 d-flex justify-content-end">
|
|
|
+ <div style="margin-top: 100px;">
|
|
|
+ <h3 set-lan="html:feature_no4_title">多語言支援</h3>
|
|
|
+ <ul class="features-list">
|
|
|
+ <li set-lan="html:feature_no4_li1">支援中英文內容</li>
|
|
|
+ <li set-lan="html:feature_no4_li2">可加入字幕</li>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="col-lg-4">
|
|
|
+ <img width="154" class="img-fluid" src="./img/组 9.png" alt="">
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div class="col-lg-4">
|
|
|
- <img width="154" class="img-fluid" src="./img/组 9.png" alt="">
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div class="col-xs-12 col-md-6 d-block">
|
|
|
- <div class="features-imgfr">
|
|
|
- <video autoplay muted loop>
|
|
|
- <source src="img/官網4.mp4" type="video/mp4">
|
|
|
- </video>
|
|
|
+ <div class="col-xs-12 col-md-6 d-block">
|
|
|
+ <div class="features-imgfr">
|
|
|
+ <video autoplay muted loop>
|
|
|
+ <source src="img/官網4.mp4" type="video/mp4">
|
|
|
+ </video>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
-
|
|
|
- <!-- <div class="col-xs-12 col-md-6 d-md-block">
|
|
|
+
|
|
|
+ <!-- <div class="col-xs-12 col-md-6 d-md-block">
|
|
|
<div class="features-imgfr">
|
|
|
<video autoplay muted loop>
|
|
|
<source src="img/官網4.mp4" type="video/mp4">
|
|
|
</video>
|
|
|
</div>
|
|
|
</div> -->
|
|
|
+ </div>
|
|
|
+ <button class="btn-dark" onclick="direct()">
|
|
|
+ <lan set-lan="html:try_it_out">立即開始</lan>
|
|
|
+ </button>
|
|
|
</div>
|
|
|
- <button class="btn-dark"
|
|
|
- onclick="direct()"><lan set-lan="html:try_it_out">立即開始</lan></button>
|
|
|
- </div>
|
|
|
- </section>
|
|
|
- <i style="font-size: 48px; position: absolute; bottom:50px; right:50px; color:#193179;" data-gt-target="#top" data-gt-duration="500" class="gotop fas fa-chevron-circle-up"></i>
|
|
|
-</div>
|
|
|
+ </section>
|
|
|
+ <i style="font-size: 48px; position: absolute; bottom:50px; right:50px; color:#193179; cursor: pointer;"
|
|
|
+ data-gt-target="#top" data-gt-duration="500" class="gotop fas fa-chevron-circle-up"></i>
|
|
|
+ </div>
|
|
|
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.9.2/dist/umd/popper.min.js"
|
|
|
- integrity="sha384-IQsoLXl5PILFhosVNubq5LC7Qb9DXgDA9i+tQ8Zj3iwWAwPtgFTxbJ8NT4GN1R8p"
|
|
|
- crossorigin="anonymous"></script>
|
|
|
+ integrity="sha384-IQsoLXl5PILFhosVNubq5LC7Qb9DXgDA9i+tQ8Zj3iwWAwPtgFTxbJ8NT4GN1R8p"
|
|
|
+ crossorigin="anonymous"></script>
|
|
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/js/bootstrap.min.js"
|
|
|
- integrity="sha384-Atwg2Pkwv9vp0ygtn1JAojH0nYbwNJLPhwyoVbhoPwBhjQPR5VtM2+xf0Uwh9KtT"
|
|
|
- crossorigin="anonymous"></script>
|
|
|
+ integrity="sha384-Atwg2Pkwv9vp0ygtn1JAojH0nYbwNJLPhwyoVbhoPwBhjQPR5VtM2+xf0Uwh9KtT"
|
|
|
+ crossorigin="anonymous"></script>
|
|
|
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
|
|
|
<script src="js/lan.js"></script>
|
|
|
<script>
|
|
|
$("*").each(function (index, element) {
|
|
|
- // 此元素被點選後執行
|
|
|
- $(this).click(function (e) {
|
|
|
- // 取得被點選元素的屬性:data-gt-target
|
|
|
- var target = $(this).attr("data-gt-target");
|
|
|
- var duration = $(this).attr("data-gt-duration");
|
|
|
- var offset = $(this).attr("data-gt-offset");
|
|
|
+ // 此元素被點選後執行
|
|
|
+ $(this).click(function (e) {
|
|
|
+ // 取得被點選元素的屬性:data-gt-target
|
|
|
+ var target = $(this).attr("data-gt-target");
|
|
|
+ var duration = $(this).attr("data-gt-duration");
|
|
|
+ var offset = $(this).attr("data-gt-offset");
|
|
|
+
|
|
|
+ // JS 語法:判斷式
|
|
|
+ // if (條件) {程式區塊}
|
|
|
+ // 當條件成立,會執行程式區塊
|
|
|
+
|
|
|
+ // 如果 目標有資料 才會執行 { } 內的程式
|
|
|
+ // 避免出現 undefine (未定義 - 不存在的資料)
|
|
|
+ if (target) {
|
|
|
+ //console.log("目標:" + target);
|
|
|
+ //console.log("時間:" + duration);
|
|
|
+ //console.log("位移:" + offset);
|
|
|
|
|
|
- // JS 語法:判斷式
|
|
|
- // if (條件) {程式區塊}
|
|
|
- // 當條件成立,會執行程式區塊
|
|
|
+ // 上方位置 = 目標區塊.位移().上方位置
|
|
|
+ var top = $(target).offset().top;
|
|
|
+ //console.log("要前往元素的上方位置:" + top);
|
|
|
|
|
|
- // 如果 目標有資料 才會執行 { } 內的程式
|
|
|
- // 避免出現 undefine (未定義 - 不存在的資料)
|
|
|
- if (target) {
|
|
|
- //console.log("目標:" + target);
|
|
|
- //console.log("時間:" + duration);
|
|
|
- //console.log("位移:" + offset);
|
|
|
+ // 網頁元素.停止().動畫({ 上方捲動:指定元素 - 位移},持續時間)
|
|
|
+ // parseInt() 將文字轉為數字
|
|
|
|
|
|
- // 上方位置 = 目標區塊.位移().上方位置
|
|
|
- var top = $(target).offset().top;
|
|
|
- //console.log("要前往元素的上方位置:" + top);
|
|
|
+ $("html").stop().animate({
|
|
|
+ scrollTop: top - offset
|
|
|
+ }, parseInt(duration));
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+ var expandbtn = document.getElementById("expand");
|
|
|
+ var compressionbtn = document.getElementById("compression");
|
|
|
|
|
|
- // 網頁元素.停止().動畫({ 上方捲動:指定元素 - 位移},持續時間)
|
|
|
- // parseInt() 將文字轉為數字
|
|
|
+ // Using JavaScript to open the page in fullscreen mode
|
|
|
+ var elem = document.documentElement;
|
|
|
+ function openFullscreen() {
|
|
|
+ if (elem.requestFullscreen) {
|
|
|
+ elem.requestFullscreen();
|
|
|
+ compressionbtn.style.display = 'inline';
|
|
|
+ } else if (elem.webkitRequestFullscreen) { /* Safari */
|
|
|
+ elem.webkitRequestFullscreen();
|
|
|
+ } else if (elem.msRequestFullscreen) { /* IE11 */
|
|
|
+ elem.msRequestFullscreen();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ function closeFullscreen() {
|
|
|
+ if (document.exitFullscreen) {
|
|
|
+ document.exitFullscreen();
|
|
|
+ compressionbtn.style.display = 'none';
|
|
|
|
|
|
- $("html").stop().animate({
|
|
|
- scrollTop: top - offset
|
|
|
- }, parseInt(duration));
|
|
|
- }
|
|
|
- });
|
|
|
-});
|
|
|
- function debounce(func, wait = 20, immediate = true) {
|
|
|
- var timeout;
|
|
|
- return function() {
|
|
|
- var context = this, args = arguments;
|
|
|
- var later = function() {
|
|
|
- timeout = null;
|
|
|
- if (!immediate) func.apply(context, args);
|
|
|
+ } else if (document.webkitExitFullscreen) { /* Safari */
|
|
|
+ document.webkitExitFullscreen();
|
|
|
+ } else if (document.msExitFullscreen) { /* IE11 */
|
|
|
+ document.msExitFullscreen();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ function debounce(func, wait = 20, immediate = true) {
|
|
|
+ var timeout;
|
|
|
+ return function () {
|
|
|
+ var context = this, args = arguments;
|
|
|
+ var later = function () {
|
|
|
+ timeout = null;
|
|
|
+ if (!immediate) func.apply(context, args);
|
|
|
+ };
|
|
|
+ var callNow = immediate && !timeout;
|
|
|
+ clearTimeout(timeout);
|
|
|
+ timeout = setTimeout(later, wait);
|
|
|
+ if (callNow) func.apply(context, args);
|
|
|
};
|
|
|
- var callNow = immediate && !timeout;
|
|
|
- clearTimeout(timeout);
|
|
|
- timeout = setTimeout(later, wait);
|
|
|
- if (callNow) func.apply(context, args);
|
|
|
- };
|
|
|
- };
|
|
|
- const featuresBlock = document.querySelectorAll('.features-block');
|
|
|
- const featuresRow = document.querySelectorAll('.sec-features .row');
|
|
|
- function checkSlide() {
|
|
|
- console.log('pass');
|
|
|
- featuresRow.forEach((block, i) => {
|
|
|
- // half way through the image
|
|
|
- const slideInAt = (window.scrollY + window.innerHeight) - block.offsetHeight / 2;
|
|
|
- console.log(slideInAt);
|
|
|
- console.log(block.offsetTop);
|
|
|
- // bottom of the image
|
|
|
- const isHalfShown = slideInAt > block.offsetTop;
|
|
|
- if (isHalfShown) {
|
|
|
- console.log('active');
|
|
|
- featuresBlock[i].classList.add('active');
|
|
|
+ };
|
|
|
+ const featuresBlock = document.querySelectorAll('.features-block');
|
|
|
+ const featuresRow = document.querySelectorAll('.sec-features .row');
|
|
|
+ function checkSlide() {
|
|
|
+ console.log('pass');
|
|
|
+ featuresRow.forEach((block, i) => {
|
|
|
+ // half way through the image
|
|
|
+ const slideInAt = (window.scrollY + window.innerHeight) - block.offsetHeight / 2;
|
|
|
+ console.log(slideInAt);
|
|
|
+ console.log(block.offsetTop);
|
|
|
+ // bottom of the image
|
|
|
+ const isHalfShown = slideInAt > block.offsetTop;
|
|
|
+ if (isHalfShown) {
|
|
|
+ console.log('active');
|
|
|
+ featuresBlock[i].classList.add('active');
|
|
|
+ }
|
|
|
+ });
|
|
|
}
|
|
|
- });
|
|
|
- }
|
|
|
- window.addEventListener('scroll', debounce(checkSlide));
|
|
|
+ window.addEventListener('scroll', debounce(checkSlide));
|
|
|
</script>
|
|
|
</body>
|
|
|
|