邱繼緯(小麥)
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Versions and GitHub Sync Note Insights Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       owned this note    owned this note      
    Published Linked with GitHub
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    # 視差滾動研究 ## 覺得需要的能力(想到就補) PS 切版 Layout 切版 * SCSS * BS? smooth scroll Parallax Scrolling 視差滾動 * CSS + JS * background-attachment: fixed * onscroll + positionY * 純 CSS * transform-style: preserve-3d * translateZ Vue 控制 * position-y EJS * 若多頁排版,可能會用到 EJS Lazy Loading 惰性加載圖片 * onscroll * Intersection Observer API 建構方案(gulp? webpack?) * 先用 webpack 處理相依模組,再用 gulp bundle 在一起? * 直接用 webpack 先處理相依模組,再 bundle 在一起? ## 接案前研究規劃 範例 * [Florian Monfrini — Catalogue 018°019](https://florianmonfrini.com/) * [CarePod | The Safest Way To Fly Your Pets | Pet Air Travel Solutions](https://care-pod.com/) * 目前官網的樣子 ### 一、目前觀念 Parallax Scrolling * `background-attachment: fixed;` 固定背景 * `background-position-y ` * 監測 scroll 事件,改變前景後景 y 位置,改變速率不同 * 或新的監控方式比較省資源(忘了) ### 二、複習六角的視差滾動影片,先做一個簡單版本,熟用原生用法 RWD課程彩蛋 jQuery * [一變應萬變的響應式網頁設計 | Udemy](https://www.udemy.com/course/responsive/learn/lecture/6412214#overview) gulp 處理 平滑滾動-套件 7kb * [cferdinandi/smooth-scroll: A lightweight script to animate scrolling to anchor links.](https://github.com/cferdinandi/smooth-scroll) 平滑滾動-原生 * [Vanilla JavaScript Smooth Scroll | Perishable Press](https://perishablepress.com/vanilla-javascript-scroll-anchor/) * [Smooth Scroll with vanilla javascript - Gurjit Singh - Medium](https://medium.com/@gurjitmehta/smooth-scroll-with-javascript-571283e9a3cd) 平滑滾動-CSS * [Smooth Scrolling | CSS-Tricks](https://css-tricks.com/snippets/jquery/smooth-scrolling/) * [[譯] scroll-behavior 滑順的捲動效果 | DEVLOG of andyyou](https://andyyou.github.io/2016/06/01/smooth-page-scroll/) 平滑滾動-jQuery 87kb Vue 精神時光屋第八週 * [第八週 視差滾動 範例 - YouTube](https://www.youtube.com/watch?v=xViDpVyIBoU) * [廖洧杰 - 【第八週 - parallax scrolling】 觀看設計稿 >> http://bit.ly/2uX1m47...](https://www.facebook.com/photo.php?fbid=2007505959269039&set=gm.210968242937648&type=3&theater&ifg=1) * [The F2E - 前端修練精神時光屋](https://www.facebook.com/groups/173311386703334/permalink/213702722664200/) * [The F2E - 前端修練精神時光屋](https://www.facebook.com/groups/173311386703334/permalink/213853355982470/) ### 三、再找幾個教學深化認知,做複雜版本 #### 3.1 輔以 JS 變化 positionY `background-attachment: fixed;` * [簡單的視差滾動](https://ithelp.ithome.com.tw/articles/10197613) * [CSS 視差滾動 (Parallax Scrolling) 範例](https://codepen.io/lhuang23/pen/YpbQMP) #### 3.2 純 CSS 實現方式 transform-style: preserve-3d; transform: translate3d * [滾動視差?CSS 不在話下 - 掘金](https://juejin.im/post/5b6d0756e51d4562b31ad23c) * [Pure CSS Parallax Scrolling | No JavaScript | HTML & CSS - YouTube](https://www.youtube.com/watch?v=6CQ7DYni7Bg) #### 3.- 其他 * [也來寫點程式碼 - 習作 1-1 純 CSS 視差滾動設計 (Pure CSS Parallax design)](https://neversaycoding.tumblr.com/post/95265641412/習作-1-1-純css視差滾動設計pure-css-parallax-design) * [小 tip: 純 CSS 實現視差滾動效果 « 張鑫旭 - 鑫空間 - 鑫生活](https://www.zhangxinxu.com/wordpress/2015/03/css-only-parallax-effect/) * [(240) parallax scrolling - YouTube](https://www.youtube.com/results?search_query=parallax+scrolling) #### 3.- 插件 * [10 個優秀視差滾動插件_Parallax Scrolling, Plus_w3cplus](https://www.w3cplus.com/source/10-best-Parallax-Scrolling-plugin.html) #### 3.- jQuery * [Wedding/index.js at master · Misty1636/Wedding](https://github.com/Misty1636/Wedding/blob/master/js/index.js) * [World-Travel/Products.vue at master · Misty1636/World-Travel](https://github.com/Misty1636/World-Travel/blob/master/src/views/Products.vue) ### 四、找 vue + 視差滾動,擬作參考範例 * [VUE 筆記:視差滾動(Parallax Scrolling)的基本實現 - 簡書](https://www.jianshu.com/p/ea8867b25fe5) 插件 * [dujuncheng/vue-parallax: 基于vue构建的视差滚动组件](https://github.com/dujuncheng/vue-parallax) * [vue-parallax 快速 60fps 視差滾動效果組件 - JavaScript 開發社區 | CTOLib 碼庫](https://www.ctolib.com/apertureless-vue-parallax.html) ### 其他、可能需要技能 圖片延遲讀取 vue + 視差滾動 onscroll 效能 * [如何不择手段提升scroll事件的性能 - 知乎](https://zhuanlan.zhihu.com/p/30078937) * [Day19 JS Scroll 實作學習](https://ithelp.ithome.com.tw/articles/10207679) IntersectionObserver API * [Intersection Observer API - Web APIs | MDN](https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API) * [IntersectionObserver API 使用教程 - 阮一峰的網絡日志](http://www.ruanyifeng.com/blog/2016/11/intersectionobserver_api.html) * [Intersection Observer vs EventListener Scroll - Cristina Llamas - Medium](https://medium.com/@cristinallamas/intersection-observer-vs-eventlistener-scroll-90aed9dc0e62) * [Animate on Scroll with Intersection Observer - Mirosław Ciastek - Medium](https://medium.com/@mciastek/animate-on-scroll-with-intersection-observer-ea744cddb876) * [Day17 探索 Browser API (上)- requestIdleCallback - iT 邦幫忙::一起幫忙解決難題,拯救 IT 人的一天](https://ithelp.ithome.com.tw/articles/10217280) * [Day26 前端中的效能優化 - iT 邦幫忙::一起幫忙解決難題,拯救 IT 人的一天](https://ithelp.ithome.com.tw/articles/10222496) 取得元素座標 * [使用 Javascript 取得元素的座標 | DEVLOG of andyyou](https://andyyou.github.io/2015/04/07/get-an-element-s-position-by-js/) ```javascript= function getPosition (element) { var x = 0; var y = 0; // 搭配上面的示意圖可比較輕鬆理解為何要這麼計算 while ( element ) { x += element.offsetLeft - element.scrollLeft + element.clientLeft; y += element.offsetTop - element.scrollLeft + element.clientTop; // 這邊有個重點,當父元素被下了 position 屬性之後他就會變成 offsetParent,所以這邊我們用迴圈不斷往上累加。 element = element.offsetParent; } return { x: x, y: y }; } ``` * [Basic offset function, replacing jQuery's offset.](https://gist.github.com/aderaaij/89547e34617b95ac29d1) * [Jquery 中用 offset().top 和 offsetTop 的比較 - 防空洞 123 - 博客園](https://www.cnblogs.com/as3lib/p/6789647.html) 聊聊 getBoundingClientRect 和 getClientRects 方法 * [聊聊 getBoundingClientRect 和 getClientRects 方法 - 知乎](https://zhuanlan.zhihu.com/p/38568124) * [你真的会用getBoundingClientRect吗 - 前端 - 掘金](https://juejin.im/entry/59c1fd23f265da06594316a9) jQuery 替代 * [You Might Not Need jQuery](http://youmightnotneedjquery.com/) * [chokcoco/jQuery-: jQuery 源碼解析](https://github.com/chokcoco/jQuery-) * [What are some alternatives to jquery? : webdev](https://www.reddit.com/r/webdev/comments/a78xy5/what_are_some_alternatives_to_jquery/) getComputedStyle * [獲取元素 CSS 值之 getComputedStyle 方法熟悉 « 張鑫旭 - 鑫空間 - 鑫生活](https://www.zhangxinxu.com/wordpress/2012/05/getcomputedstyle-js-getpropertyvalue-currentstyle/) * [前端學習筆記 style,currentStyle,getComputedStyle 的用法與區別 | 程式前沿](https://codertw.com/%E5%89%8D%E7%AB%AF%E9%96%8B%E7%99%BC/265562/) * [【CSS 進階】原生 JS getComputedStyle 等方法解析 - ChokCoco - 博客園](https://www.cnblogs.com/coco1s/p/5210667.html) * [getComputedStyle 基礎語法 JavaScript 前端・404k 的前后端日志](http://blog.404mzk.com/getcomputedstyle.html) ### 其他、參考範例 * [Smooth Scrolling Image Effects | Codrops](https://tympanus.net/codrops/2019/07/23/smooth-scrolling-image-effects/) * [指定位置縮放 navbar 使用 jQuery 打造互動性網頁動畫效果 | Udemy](https://www.udemy.com/course/jquery-learning/learn/lecture/5237652#questions/7318788) * [滾動順暢](https://www.facebook.com/groups/f2e.tw/permalink/2214825421888144/) * [jquery/jquery-mousewheel: A jQuery plugin that adds cross-browser mouse wheel support.](https://github.com/jquery/jquery-mousewheel) * 全屏滾動 * [使用 jQuery 打造互動性網頁動畫效果 | Udemy](https://www.udemy.com/jquery-learning/learn/lecture/5190568#questions/7267300) * [fullPage.js](https://codepen.io/TzuHui/pen/orvYOX?editors=0010) * [fullPage.js | One Page Scroll sections Site Plugin](https://alvarotrigo.com/fullPage/#) * [[十分鐘學習] fullPage.js - 全頁式導覽](https://ithelp.ithome.com.tw/articles/10197764) * [jQuery 全屏滾動插件 fullPage.js_dowebok](http://www.dowebok.com/77.html) * [使用 fullPage.js 設計單頁式選單滑動區塊的全屏滾動網站 | ucamc](http://www.ucamc.com/e-learning/javascript/298-fullpage-js單頁式選單滑動區塊的全屏滾動網站.html) * [無需 JavaScript 實現的自動滾動視差效果 | InspireGate 派克空間](http://inspiregate.com/programming/html-css/185-achieved-automatically-without-the-need-javascript-parallax-scrolling-effect.html) * [[十分鐘學習] Parallax - 某站做出視覺效果竟然是靠它 - iT 邦幫忙::一起幫忙解決難題,拯救 IT 人的一天](https://ithelp.ithome.com.tw/articles/10196098) * [wagerfield/parallax: Parallax Engine that reacts to the orientation of a smart device](https://github.com/wagerfield/parallax) * [使用 Parallax.js 實現簡單視差效果 | AlloyTeam](http://www.alloyteam.com/2015/09/use-parallax-js-to-implement-simple-parallax-effect/) * [如何使用 skrollr 做出簡易的 Parallax Scrolling 網頁 (Example)](https://coderwall.com/p/we0ymg/skrollr-parallax-scrolling) ## 起因 哈囉,這邊有個案子,有興趣嗎? 主要是畫面切版 + 視覺動態效果 工時約三週 參考範例:https://florianmonfrini.com/ 費用約 4 萬上下,實際金額還在談 是國外的案子,品質會比較要求 你 ok 的話,我會以你作為執行者跟對方談喔 ## 詢問 我第一次詢問 > 好 > 老師我有興趣 > 不過我視差滾動沒有很熟,這幾天要回去複習一下 > > 其他想再問一下的 > 1. 和參考範例一樣,是單頁式的網頁嗎 > 2. 之前看 Ray 的分享,接案形式類似我當開發者,六角當 PM 這樣嗎 > 3. 在開發期間若對於自己需要的技術細節不確定,可以再請教六角嗎(例如,gulp + sass 是否能應付這個專案、…… 之類的問題) 老師回答 > 實際不確認是否為單頁,會在與對方確認 > 因為設計稿還沒出來 > 但是是以形象為主沒錯勒 > 2 是的,也會有 fable 專案人員配合 > 3 我們可以做協助,但不會插手 > > 主要還是給你們練習 > 這案子可以用 vue > 不確定是否接受 jquery 我再次追問 > 好的~謝謝老師回覆 > > 不過老師提到 Vue 了,就還是問一下 > 1. 若用 Vue 的話,就是最後 build 出編譯後的 dist 資料夾,然後對方會再拿這個資料夾的檔案去上在他們的網站伺服器上? > 2. seo 的部份,記得單純使用 Vue 的話,SEO 跟靜態網站比起來沒這麼好。在這個專案中需要特別處理這件事情嗎,還是用像六角 Vue 電商那樣的開發流程就可以了(vue-cli) 老師回答 > Vue 也可以不搭配 cli 勒 > 如果可以的話 > 這幾天可以先練習原生寫視差滾動 我總結 > 喔喔好的 > > 1. 突然忘記可以用 cdn 的方式引入 Vue 了 orz。這樣在小型專案中就能用 cdn 引入 vue、並直接在 HTML 上使用 Vue 的語法,這樣 SEO 就不太會受影響了(因為 google 爬蟲還是能看到 HTML 的內容) > 2. 好,這幾天我先複習先前的視差滾動課程,再練習看看原生視差滾動的寫法~

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully