參與成員暱稱 | Slack ID |
---|---|
Jun Chan | U023XF7RXU1 |
Joey Chen | U02426Q0Z1N |
Mia Tsai | UU109UWG1 |
PEI CHI TSAI | U02415QR0TA |
sejuan | U023Z9KD9S8 |
Stephanie Kan | U0245BXM42W |
Yao Lin | U0246PJB49W |
以下範例程式碼的 .text 高度是多少?(請不要用瀏覽器觀察)
<div class="text">
<img alt="" src="logo.png" height="90" />
</div>
Ans: 92~93px
圖片height 90px+圖片預設的留白2-3px=92~93px
請問 .box 的高度是多少?(請不要用瀏覽器觀察)
<div class="box">
<h1>標題</h1>
<p>段落</p>
<p>段落</p>
<img alt="" src="logo.png" height="90" />
</div>
.box h1{
font-size: 24px;
line-height: 36px;
}
.box p{
font-size: 16px;
line-height: 1.5;
margin-bottom: 24px;
}
.box img{
display: block;
}
Ans: 222px
h1 36px + p (16px*1.5) * 2 + margin-bottom 24px * 2 + img 90px = 222px
(img有設定block,無需計算2~3px的留白)
請問 .card 的寬高與高度各是多少?(請不要用瀏覽器觀察)
<div class="card"></div>
.card{
width: 50px;
height: 50px;
border-bottom: 3px solid orange;
border-right: 3px solid #000;
background: #000;
padding: 20px;
}
Ans: width 93px、height 93px
寬度width: 50px + border-right 3px + padding 20px * 2(左右) = 93px
高度height: 50px + border-bottom 3px + padding 20px * 2(上下) = 93px
請優化此程式碼,優化重點為:
Ans: Codepen連結
請優化此程式碼,並將程式碼連結放到 Codepen 上。優化重點為:
Ans: Codepen連結
彼此討論 pixel perfect kata,你會如何透過 flexbox 來排版?
Ans: 規劃架構如圖
or
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
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.
Do you want to remove this version name and description?
Syncing