AstroCamp 6th
      • 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
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Write
        • Owners
        • Signed-in users
        • Everyone
        Owners 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
    • Make a copy
    • Transfer ownership
    • Delete this note
    • 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 Help
Menu
Options
Engagement control Make a copy 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
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Write
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners 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
    # 1118_htmlcss_day8 [![hackmd-github-sync-badge](https://hackmd.io/_Y-9iQE9TwScsC0HZiwg4g/badge)](https://hackmd.io/_Y-9iQE9TwScsC0HZiwg4g) --- #### 上課日期:1118 ###### tags: `html/css` ###### tags: `5xruby` --- # 相關連結: - [AstroCamp課程影片](https://campus.5xruby.tw/courses/1136422/lectures/25361517) - 還沒看的,趕快去看啦!!! [AMOS老師 - 金魚都能懂的網頁教學(清單)](https://www.youtube.com/playlist?list=PLqivELodHt3iL9PgGHg0_EF86FwdiqCre) - 建議看:[金魚都能懂網頁設計入門:怎麼學CSS](https://youtu.be/h7wJ2YZarFc),並整理出心智圖! - 建議看:[金魚都能懂的CSS必學屬性](https://ithelp.ithome.com.tw/users/20112550/ironman/3803?sc=iThelpR) - [金魚都能懂的網頁切版(清單)](https://www.youtube.com/playlist?list=PLqivELodHt3hxeuLX8PYaI8u1GcDaBoJo) - [金魚都能懂的Bootstrap5網頁框架開發(清單)](https://www.youtube.com/playlist?list=PLqivELodHt3jq3oWBZfdhMu0GE7774HBW) - [position-金魚都能懂的CSS必學屬性](https://ithelp.ithome.com.tw/articles/10253500) --- # 0. 綱要/目錄 - [ ] 定寬容器 - [ ] 等比例區塊 - [ ] 作業 code review - [ ] 作業 - [ ] 附件 --- # 1. 定寬容器 #### 定寬容器: - 固定寬度的的容器 - 會依視窗變化寬度,但大到一個尺寸之後就不再變大的容器。 設定最大寬度,用`max-width` - 設定RWD通常不會設定高度,因為螢幕變動時(改變寬度),內容不變,所以顯示會往下長。 #### 斷點 - 設定不同大小的裝置的地方(從哪個尺寸、像素切開) e.g.`@media screen and (min-width: ....)` - container定寬容器 > row > col分欄容器 > item資料容器 > 要幾個欄位,由col來決定 - **[note]**:Bootstrap的先備知識:格線系統 Grid System - `g-1`、`g-2`、`g-3`....的g,是gutter > 欄位間距(gutter):由margin和padding形成 --- ### VScode小技巧 #### 在外面加上一層1 1. 選取目標區塊 2. cmd + shift + p 3. 鍵入wrap(選abbreviation) 4. 輸入新包覆外層的名稱 > ex:section.news = `<section class="news">` #### 在外面加上一層2 1. 選取目標區塊 2. cmd + shift + p 3. 鍵入wrap(選individual lines with abbreviation) 4. 輸入新包覆外層的名稱 > li* = 每個項目分別加上li #### 其他 option + shift + 方向鍵 = 往..方向複製 cmd + 前/後 = 跳到最前面/最後面 --- # 2. 等比例區塊 > 常見於網頁中的嵌入區塊,像是youtube播放區塊、googlemap等。 - 使用padding-bottom來設定 - 這裡的尺寸(百分比)會參照父層的寬度 > 父層的contain box >> 扣掉padding) ### 嵌入 1. mv比例 => img撐開 1. img比例 => iframe比例 1. mv比例 => iframe比例 1. iframe寬高 => mv寬高 = iframe原始比例 --- # 3. 作業 code review #### 主標題(h1)的使用 - 一般來說,一個頁面只會有一個h1,太多可能被google視為對搜尋SEO作弊。 - BUT,在html的設定文件中,每個章節(section)可以有一個主標題(h1) #### 命名-少用方位與編號 - 如`class="left"` - 在桌機的left/right,到了手機就為變成top/bottom => 就會變成名稱與實際顯示的不符 - 或是內容數量有變動,編碼與內容也會不符 #### 歸零的設定 - 避免使用`*`,可以找normalize.css來用 #### 圖片 - 掉圖是大忌!!! - 路徑記得設定好! #### margin與padding - margin會有重疊的問題 --- # 作業 - 先前的切版作業,改用RWD再做一次 - 手機的選單請見[金魚#23](https://www.youtube.com/watch?v=E9SosNZkX7Y) --- # 附件 - [Keyboard shortcuts for macOS(HackMD)](https://hackmd.io/@astrocamp6th/ByyYELf9v) - [Keyboard shortcuts for macOS(pdf)](https://code.visualstudio.com/shortcuts/keyboard-shortcuts-macos.pdf) - [Keyboard shortcuts for Windows(pdf)](https://code.visualstudio.com/shortcuts/keyboard-shortcuts-windows.pdf) - [wireframe(chrome擴充功能)](https://chrome.google.com/webstore/detail/wireframe/amchfjeinhflcmbpdgdihhdoogdagcaf?hl=zh-TW) - 看網頁架構 - [web-paint(chrome擴充功能)](https://chrome.google.com/webstore/detail/web-paint/emeokgokialpjadjaoeiplmnkjoaegng/related?hl=zh-TW) - 在網頁上畫線

    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