Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

完成 week6 作業 #8

Merged
merged 3 commits into from
Aug 31, 2020
Merged

完成 week6 作業 #8

merged 3 commits into from
Aug 31, 2020

Conversation

zanwan
Copy link
Collaborator

@zanwan zanwan commented Aug 27, 2020

這週作業完成後,對自己 CSS 能力有自信多了!擺脫以前想做到,但都要蘑菇非常久才做出來,而且還不一定知道自己在幹什麼的狀況。基本的選擇器、屬性語法可以自然打出,跟以前相比真的少了很多查閱的煩躁時間,謝謝自己的努力 😂

這次嘗試了一些東西:

  1. 研究一番 breakpoint 該斷哪幾的點比較好,最後決定使用 1024px (桌機最小尺寸)、768px (平版直立)、568px (手機橫放)、320px (手機最小直立)
  2. 使用 flexbox 做純 CSS 的漢堡選單,訣竅是透過 label 觸發 input radio 的 toggle
  3. 使用 label 做出 Google 表單的輸入框、勾選動畫效果
  4. 使用 webP 檔案優化網頁圖像載入
  5. 使用 aria-labelledby 屬性,替被我客製的表單輸入框維持 Accessibility 分數
  6. 製作視差滾動效果,在 backgraound-position: fixed 和直接使用 <img> 之間游移,最後使用 <img>因為可以用 <picture> 指定載入的圖片格式或大小,在手機上也有視差效果。
  7. 搞懂 CSS 的 px 是虛擬單位,不是物理螢幕的像素尺寸!(但網路上好多爭議,也有大大寫錯(?,就我看來 CSS Trick 網站說的就是對的哈哈)搞懂 CSS 單位,就不會用得怕怕的...
  8. 跑跑 Lighthouse 看看兩份作業的分數,大概了解它的要求

咬一口廚房預覽
新拖延運動預覽

謝謝 Huli 和助教的批改!

@zanwan zanwan added the 基本作業完成 完成該週基本作業 label Aug 28, 2020
Copy link
Contributor

@ChihYang41 ChihYang41 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

寫的很好耶!從漢堡選單、視差滾動、注意 Accessibility 和簡答題的回答等等,都可以看到你對這次作業的用心,也很開心你對 CSS 越來越上手了,總之這次作業我是推爆

<picture>
<source srcset="src/img/p-1.webp" type="image/webp" />
<source srcset="src/img/p-1.png" type="image/png" />
<img src="./src/img/[email protected]" alt="蘿莉控遺像" />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

這個 alt 😂

</head>
```

疑問:聽聞 `<a>` 如果是 `target="_blank"` 要加上 `rel=noopener noreferrer` 來防止惡意導向,不知道這個屬性是不是可以直接加在 `<base>` 上...
Copy link
Contributor

@ChihYang41 ChihYang41 Aug 31, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

查了一下資料,從 MDN 看來目前是沒有這個 attribute,不過的確是有看到討論 rel=noopener for form and base elements

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

看起來好像開放用在<base>上會增加混亂,需要的時候在使用於<a>就好。


#### ✅ P2 你熟悉 CSS selector,可以輕鬆選到想選到的元素

有越來越輕鬆的感覺沒錯
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

讚啦

@ChihYang41 ChihYang41 merged commit 11ffd34 into master Aug 31, 2020
@ChihYang41 ChihYang41 deleted the hw-week6 branch August 31, 2020 13:57
@Jianna9527
Copy link

好猛的作業啊啊啊,朝聖 🙇‍♀️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
基本作業完成 完成該週基本作業
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants