六角學院
    • 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 New
    • 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 Note Insights Versions and GitHub Sync 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
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # BS4 格線系統與 SCSS 結構設計 ## Mobile first 與 Desktop first 差別 * [desktop first](https://codepen.io/liao/pen/WNQJVqr?editors=1100) * [mobile first](https://codepen.io/liao/pen/jObxgeW?editors=1100) ## 格線系統 - 減輕 magic number 出現 * 格線系統關鍵字:column(欄)、gutter(間距) * [960 grid,以前解析度都是 1024](https://960.gs/demo.html) * [BS4 layoutit](https://www.layoutit.com/build) > 常見總欄數是 12 > 69 ## [BS4 格線系統](https://bootstrap.hexschool.com/docs/4.2/layout/grid/)原理 * 排版三劍客: .container、.row、.col 1~12 * .container * .container 固定寬度 * .container-fluid 滿版 * .row * no-gutters:不需要 gutters * 卡斯伯名言 1:.col- 的外層只能是 .row * 卡斯伯名言 2:.row 裡面只能是 .col- * 卡斯伯名言 3:網頁內容與元件請放在 .col- 裡面 > 常見錯誤,在 .col 增加寬度 > 常見錯誤,在格線系統調整左右 margin 與 padding > 常見觀念:可以加上下 的 margin 與 padding > 常見觀念:最外層至少補一個 container > 常見觀念:整體格線邏輯是一致 ## BS4 格線斷點設計 * [文件位置](https://bootstrap.hexschool.com/docs/4.2/layout/grid/#grid-options) * 簡報說明 > Live Demo 檢視 > 卡斯伯常用版型 md、lg > 91 ## 格線系統與元件整合 * 格線與卡片設計 * [範例處](https://codepen.io/liao/pen/abvaXyy?editors=1100) ## BS4 SCSS 編譯 * 下載 [BS4](https://github.com/twbs/bootstrap) 程式碼,修改變數 * 修改既有顏色變數 * 修改格線寬度 > 將 Demo 如何整合自己寫的 CSS * 整合自己的 SCSS,載入 BS4 與自己的 SCSS * bootstrap * base * layout * component ## BS4 最終奧義 * 拋棄頁面功能,擁抱元件型 class * 一開始用 BS4,會很想都手寫,建議格線用 BS4,元件自己挑合適的 * 需要練功的細節,如何將 Page 與 Layout 的內容都變成可復用的元件 * 避免過度設計化 * 在觀看別人的框架時,觀看他的設計思維與切入重點 ## 編譯 [BS4 SCSS](https://github.com/twbs/bootstrap/tree/master/scss) ,用 [NPM 套件工具](https://bootstrap.hexschool.com/docs/4.2/getting-started/download/#npm)來安裝,[匯入方式](https://bootstrap.hexschool.com/docs/4.2/getting-started/theming/#importing) 步驟一:開啟新資料夾,將資料夾 cd 拉進終端機 步驟二:輸入指令 `npm init`,一直按 enter 後,資料夾裡面會多一個 `package.json` 檔 步驟三:安裝 BS4 套件,指令是 `npm install bootstrap`,安裝成功後會多一個 `node_modules` 資料夾 步驟四:@import BS4 SCSS 檔案,[連結處](https://bootstrap.hexschool.com/docs/4.2/getting-started/theming/#importing) > 不要去修改 node_modules 裡面的檔案 > 需要使用到的項目直接 @import node_modules 的檔案 > 需要變更內容,請抓出來一份來進行 SCSS 編輯,並設為預設值 !default ### 結構 ``` // Required @import "../node_modules/bootstrap/scss/functions"; @import "variables"; // 複製一份 variable 來覆蓋 @import "../node_modules/bootstrap/scss/mixins"; @import "../node_modules/bootstrap/scss/bootstrap"; ``` ### JS CDN * [最新版 JS](https://getbootstrap.com/docs/4.3/getting-started/introduction/) ### QA Q:我上傳網站,需要上傳 node_modules 嗎? Q:我上傳網站,需要上傳 SCSS 檔案嗎?

    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