<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by William Hu on Medium]]></title>
        <description><![CDATA[Stories by William Hu on Medium]]></description>
        <link>https://medium.com/@WilliamHuu?source=rss-244ea6cdf3a0------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*fJGVF4hvuleZvU-J.</url>
            <title>Stories by William Hu on Medium</title>
            <link>https://medium.com/@WilliamHuu?source=rss-244ea6cdf3a0------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 22:20:29 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@WilliamHuu/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[if、 for、while、swtich]]></title>
            <link>https://medium.com/@WilliamHuu/if-for-while-swtich-7a0289517fbf?source=rss-244ea6cdf3a0------2</link>
            <guid isPermaLink="false">https://medium.com/p/7a0289517fbf</guid>
            <dc:creator><![CDATA[William Hu]]></dc:creator>
            <pubDate>Sun, 13 Jun 2021 13:05:40 GMT</pubDate>
            <atom:updated>2021-06-13T13:05:40.578Z</atom:updated>
            <content:encoded><![CDATA[<p>if :</p><p>if (condition) {<br> commands<br>} else {<br> commands<br>}</p><p>for:</p><p>for ($count=1; $count&lt;5; $count+=1)<br>{<br>commands<br>}</p><p>while:</p><p>expression1<br>while (expression2) {<br> commands<br> expression3; <br>}</p><p>switch:</p><p>switch (expression)<br> {<br> case constant1:<br> statements<br> break<br> case constant2:<br> statements<br> break<br> … <br>default: <br> statements<br> break<br>}</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7a0289517fbf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[S5–1關於版本控制，GIT，GITHUB，SOURCETREE]]></title>
            <link>https://medium.com/@WilliamHuu/s5-1%E9%97%9C%E6%96%BC%E7%89%88%E6%9C%AC%E6%8E%A7%E5%88%B6-git-github-sourcetree-e84ee54efbb?source=rss-244ea6cdf3a0------2</link>
            <guid isPermaLink="false">https://medium.com/p/e84ee54efbb</guid>
            <dc:creator><![CDATA[William Hu]]></dc:creator>
            <pubDate>Tue, 01 May 2018 19:43:08 GMT</pubDate>
            <atom:updated>2018-05-01T19:47:38.212Z</atom:updated>
            <content:encoded><![CDATA[<p>首先先講講版本控制</p><p>那其實最基本原理就像是遊戲的存檔和讀檔</p><p>而分支代表你可以把存檔分出一個路線給別的人去玩，玩一玩任務解完了</p><p>還可以跟你的存檔一起合併</p><p>至於GIT 不等於 GITHUB</p><p>有點類似網路雲端存放獨黨的地方其實有很多，但是有個地方是最被公認的，大概就是這樣的概念。</p><p>然後圖形化的SourceTree這種軟體，則是輔助器</p><p>如果你只能用指令機儲存遊戲檔案，但是卻什麼都看不到未免太憋屈了吧？</p><p>所以SourceTree就有點類似讀存檔清單，你能看到你何時存了什麼，誰存的，任務有幾條分支正在進行中之類的。</p><p>接下來就是實際操作了。</p><p>第一部分，先貼出截圖的部分。</p><p>首先是終端機操作。</p><p>git這個版本控制，其實就是該資料夾底下有一個.git資料夾作為版本控制</p><p>所以會圍繞著的就有點像是在專案資料夾安裝上一個額外插件的概念。</p><p>這次會圍繞這樣的概念練習。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/482/1*DSc9uq5otzW-KzBePp34fA.png" /><figcaption>下面還會有圖形化程式的示範。</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8daKCcSyYcvq124-1vj4Rw.png" /><figcaption>首先先檢查git版本，如果不是最新的就更新吧</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sHyh6NG3pJhTqnByLg1G0Q.png" /><figcaption>更新GIT版本</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rChX3f7I9wBba1S3awTynQ.png" /><figcaption>接下來本地端設定你的name以及email（可以重複設定來蓋過去）</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*s5mR2fAsWYPGJHSNDc89EQ.png" /><figcaption>顯示本地端git的詳細內容，也會包括上述的兩項</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LSrXXAjmNG-HPTgcz2m0JA.png" /><figcaption>接下來先用cd（資料夾移動）以及pwd(確認當前資料夾位置)確認無誤，就輸入本指令，來『安插』git進入本資料夾</figcaption></figure><p>附帶一題，當你輸入cd後補上資料夾名稱的時候，只要打上幾個關鍵字按下TAB他就會自動尋找最高相關的資料夾顯示出來，這是相當方便的功能（例如輸入sta 後就按下TAB，就會跳出static_website，按下ＥＮＴＥＲ就完成了。）</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*awOJyyNFMUGkPSYTQWvPMA.png" /><figcaption>ls(顯示資料)，-al(全部包括隱藏檔案)裡面有.git就代表成功了</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/716/1*PBYTjyRaWFC7inDtvhNeJQ.png" /><figcaption>當你成功之後，在資料夾底下會多出(x master)的內容</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DC112RfHwSyV7AxCPHAUEQ.png" /><figcaption>當你要移除git控制的時候則是輸入本指令</figcaption></figure><p>接下來是圖片化的輔助程式版本（本次以SOURCE TREE來做為示範）</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_YMQal_P_lBQA-EPJZIxyg.png" /><figcaption>要看git版本或是帳號狀態都要點這個齒輪按下account</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WT8Wu3rpluqkA1pKRzOFvQ.png" /><figcaption>git的部分會顯示你的版本</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ip9HnkuMCCKxzeIz22QDDQ.png" /><figcaption>general則是會顯示你的名稱和信箱資訊(在這邊更改後關閉視窗，在終端機刷新狀態是可以看到更動的)</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/962/1*hAJIVVJ22TiHm7s6VXePRw.png" /><figcaption>這個部分則是從本地端尋找專案資料夾以後新增即可達成路徑和init的動作</figcaption></figure><p>至於移除的部分SourceTree似乎是不支援的，只能透過終端機去執行</p><p>rm -rf .git</p><p>來達成移除功能。</p><p>本章節常使用的指令：</p><ol><li>git init 在本專案資料夾建立GIT</li><li>rm -rf .git 將本專案資料夾的git移除（其實只是刪除git資料夾，但是目前只能透過終端機來刪除）</li><li>git config —global user.name “我的名字”(不常用)</li><li>git config — global user.email “”我的email(不常用)</li></ol><p>接著進入下一個章節。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/862/1*w4h9xX7WhuRYIgXGbarGLg.png" /><figcaption>本章節要做的事情。</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YJtu-t5hgqP_GOv1ULrkyw.png" /><figcaption>git從add到commit的概念</figcaption></figure><p>首先是終端機狀態執行</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UhVpP5H4TV4MnVV_Kl0_zQ.png" /><figcaption>先到專案資料匣輸入git status,確定了這是新專案，有多少個檔案有被修改過沒有被提交到暫存區（因為是輸入過git init後第一次打開，所以當然都是新的）</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yd7c-ZMzo_CdpIu3Qa_JYg.png" /><figcaption>先嘗試進行一次git add index.html,把單一檔案加入到暫存區後，輸入git status可以確認到有一個檔案被加入暫存區了，其餘的還沒</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EuNnggqgMrsEGG5PEbeqHA.png" /><figcaption>此時可以使用git add .(空格後一個點),代表把所有沒有提交過的內容通通一起放到暫存區</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_ikhRrQGPMfRyH8vtE3qqA.png" /><figcaption>最後輸入git commit -m “要輸入關於這個版本的訊息”，在上面寫的比較詳細，把改了什麼都寫進去（中文也可以）</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xVRfYVOCGP52sCxmFO-Mew.png" /><figcaption>最後再一次進行確認，已經沒有任何需要更新的檔案，也沒有放在暫存區的內容。</figcaption></figure><p>接下來是圖型化控制的流程。</p><p>我在index.html的title加了6666</p><p>以下開始跑流程。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9dmI6pxX6HfoKhYqBqcA3g.png" /><figcaption>一經過修改之後，就可以看到source tree上面顯示了變動過的內容，此時在檔案上面打勾就可以等於叫做git add，點擊左上角的commit進入commit的動作</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IxhX3-j4Il76fMSgmIi3Eg.png" /><figcaption>在下方輸入git commit關於這個版本的內容說明</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EUsWbWctrymGNIP84LeOyg.png" /><figcaption>commit過後，可以看到新的一個版本出現了。</figcaption></figure><p>git status 確認當前專案狀態</p><p>git add “filename” 將『某個檔案』加入到暫存區</p><p>git add . 將所有檔案加入到暫存區</p><p>git commit -m “message” 將已經放到暫存區的檔案進行一次版本提交，同時附上關於這個版本的訊息說明。</p><p>接下來進行下一個部分，還原專案版本。</p><p>本次將著重於錯誤版本，內容修正以及還原。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/854/1*yrrt3OCjEHQMAUKzWw1Uvw.png" /><figcaption>本章節的練習內容</figcaption></figure><p>git log 查看提過的git版本(同時會顯示SHA1版本代碼)</p><p>git diff 查看不同的內容</p><p>git reset “git log顯示的A版本代碼”（將Ａ版本以後的版本全部刪除，但是被異動過的程式碼會留下來。）</p><p>要用遊戲的說法，就是你輸入指令後會把某個時間點存檔以後的存檔全部刪除了，但是你玩到現在的內容會留著，只要你不關機。</p><p>git revert “git log顯示的C版本”（將C版本的程式異動內容全部還原，但是Ｃ版本會被保留成一個版本，被還原的內容也會再形成一個版本）</p><p>要用遊戲的說法，就是你輸入指令後會將特定的某個存檔更動過的內容全部都還原（從上一次存檔到現在），但是奇特的是，這個存檔會留下來。有些彆拗，更淺顯易懂的說法，就是讀取更舊的紀錄，但是新紀錄還在，只不過你會以舊紀錄繼續玩下去。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*l9lkoP_kBx3LWmiPDxx0lw.png" /><figcaption>大致上是這樣的。</figcaption></figure><p>接下來透過圖形化來檢視。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bgwMtsbJJXdt260PlOsqJQ.png" /><figcaption>git reset 直接把點選的版本後的版本全部移除，但是會保留所有被異動過的程式碼。</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I_8ZsBzHtyDZYu7GLnEfcw.png" /><figcaption>對著錯誤的版本點選reverse，就會移除該版本所有程式碼異動，但是保留這個版本</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zewfm_u9sfFsK2ePmgYOFg.png" /><figcaption>確定後，這個是被保留下來的版本</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NBg9I4Lbix4FkB1eY1BhWQ.png" /><figcaption>而上面有顯示過revert的就是被還原的版本內容</figcaption></figure><p>所以拆的越細一定是越好，這樣才能避免著火的時候，發現一個版本怎麼放了一大堆垃圾，跟沒做一樣。</p><p>接下來是關於版本控制的專業素養…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/746/1*jAUWAtGlzvX22U_l3JeCEA.png" /><figcaption>聽起來像廢話，但真要你執行你做得到嗎？</figcaption></figure><ol><li>上述有提到，如果一個commit全部放在一起，牽一髮動全身，事情很麻煩。</li><li>比如Ａ功能和Ａ修正最好放在一起commit,B功能和B修正放在一起，而非AB功能修正一起提交這樣。</li><li>commit可以視為上線，半成品請不要上傳。</li><li>commit前測試，前提是可以運作的</li><li>『今天憨包新人的東西我救好了』，『主管叫我做的功能』這種的將會一直留下來。『Ａ功能效能不足，補齊』這樣才是好的習慣。</li></ol><p>簡而言之，畢竟git的出發點就是多人協作減少溝通困難，就是叫你別當豬隊友的意思。</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e84ee54efbb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Demo Day 2018/04/19-Alphacamp]]></title>
            <link>https://medium.com/@WilliamHuu/demo-day-2018-04-19-alphacamp-4ac728b33d50?source=rss-244ea6cdf3a0------2</link>
            <guid isPermaLink="false">https://medium.com/p/4ac728b33d50</guid>
            <dc:creator><![CDATA[William Hu]]></dc:creator>
            <pubDate>Mon, 23 Apr 2018 05:50:43 GMT</pubDate>
            <atom:updated>2018-04-23T05:50:43.222Z</atom:updated>
            <content:encoded><![CDATA[<h3>1.衣服穿搭配色網站</h3><p>透過配色原理，讓不會配衣服的人來找出一套菜單</p><p>吃瓜群眾看演講：無明顯缺陷，創意十足，有工程師的台風卻不失創意</p><p>評審：三圈，無問題，提出的功能不足部分（長短袖，夏冬季），其實就是開發時間不足</p><p>以產品概念來說：十分完美，對於不懂穿搭的人來說確確實實有很大的幫助。</p><p>營收模式猜測：如果到達一定的規模，衣服販賣商會自行聯絡本產品持有人導入輔助系統，來關聯到別的商品。</p><h3>2.以圖搜圖尋找產品</h3><p>就像Shazam一樣，他是用音樂找歌名，這個是用圖片找商品。</p><p>吃瓜觀眾看演講：網站上的介紹稍顯多餘</p><p>評審：二叉，他們測試其實有一些錯誤跟時間逾時，專案看起來並沒有做得這麼迎刃有餘。</p><p>以產品概念來說：非常有趣，類似音樂的Shazam，但最後團購有點問號，其實可以考慮直接進入購買頁面</p><p>營收模式猜測：想的到的，或許就是導入廣告，因為Shazam可以直接導向Play或是Apple Store.畢竟販賣平台有這麼多。除非對岸那樣，是直接把你的產品買斷而非合作…阿里巴巴做得到，但是ＰＣＨＯＭＥ估計做不到。但是產品概念真的很有趣，也很簡單。</p><h3>3.獨立音樂資訊提供平台</h3><p>上本平台可以爬蟲，找出音樂內容並且顯示樂團等等資料，還可以追蹤</p><p>ＰＳ：獨立音樂，講的比較難受些，就是沒被商業看上，乏人問津，無法商業盈利的冷門音樂，所以水準其實不一。</p><p>吃瓜群眾看演講：對工程師阿宅來說，熱情超越了產品操作說明，多一些說明會更好一些，詳細說明產品到底有什麼功能。</p><p>評審：三圈，專案完整以他們操作過的經驗來說是非常夠的。專案代碼則是ＯＫＡＹ的，並沒有看起來很慘烈的樣子。</p><p>以產品概念來說：沒有問題，與其說這個概念很新奇，不如說是缺乏第一位。</p><p>營收模式猜測：投入周邊販賣，或是售票。</p><h3>4.旅遊規劃</h3><p>自行規劃旅遊（也可以複製），並且獲得點數回報換取折扣</p><p>吃瓜群眾看演講：無特別問題，估計只有真正去旅遊過的了解吧</p><p>評審：三叉。網站有BUG，emm…同時對產品的想法如下，並非完整化的內容</p><p>以產品概念來說：其實已經有人在做這個這個概念了…加上產品使用其實太過複雜，就像大家不想找字典，想找懶人包，但是你提供的內容，往往都是只有你自己看得懂的隨手筆記。此概念不錯，但是可以再改善使用。（比如簡化）</p><p>營收模式猜測：跟商家合作，但是這個要跨企業跨國的，而且太多競爭者…</p><h3>5.GOGORO遊戲化旅程</h3><p>GOGORO不只是騎車，而是讓你變成遊戲化旅途，點數還可以換取商品折扣。</p><p>吃瓜群眾看演講：無特別問題，產品有好好的詳細說明。</p><p>評審：三圈。網站沒有什麼問題。遊戲化任務清單引導可以做得更好。(從這裡來看，評審的工作是評定是否有好好完成『開發者』的工作，而不是『本產品是否可行』。)</p><p>以產品概念來說：新奇但不驚艷。這就像是有一個ＡＰＰ能告訴你你現在在用的馬桶是什麼品牌一樣，其實…並不是什麼真正被需要的功能。我們使用這個GOGORO是為了交通，而非享受。（但這單純是個人看法，而不是所有人都這麼想。）</p><p>營收模式猜測：跟商家合作。</p><h3>6.非工程師修改網頁</h3><p>直接在GOOGLD-DOC改內容，就能變動內容。（不用上ＨＴＭＬ5修改）不需要請工程師處理。包括背景圖片，也包括文字內容</p><p>吃瓜群眾看演講：說明不太清楚，但能了解概念。</p><p>評審：三叉。網站使用無法理解。</p><p>以產品概念來說：身為『網頁工程師』出身，我想說，這是一個『健全網站』本來就會擁有的功能，事實上，前端要改什麼，會有一個後台讓你登入管理者模式，就直接針對網站要修改什麼來提供修改。（輕到Wordpress,Joomla,重到客製化設計）你不會在一個手機上面設計一個手動關機程式，對吧？這種功能小企業合作的接案公司就會洽談這個部分，或是這種類型的功能已經太多。但我前身為工程師，對於非工程師來說這意見自然是主觀的。</p><p>營收模式猜測：企業版權販賣。</p><h3>7.國泰世華線上信用貸款預約</h3><p>讓你在線上直接進行信用貸款申請。</p><p>吃瓜群眾看演講：非常清楚，挑明了這東西能讓你做什麼，為了解決什麼。</p><p>評審：二圈一叉。叉的部分：程式概念沒問題，但是寫程式方面是不合格的…也缺乏後端，建議導入追朔（使用者在什麼地方離開了，第幾部分？）</p><p>以產品概念來說：冷門，偏門，但是很實用。確實部分人能減少銀行抽號碼牌等待時間市值得一做的。（雖然我不知道會去銀行借錢的到底有多少人…畢竟我不借錢，但不代表別人不借，對吧。）</p><p>營收模式猜測：直接導入國泰世華。</p><h3>8.透過結帳將資料循環到企業系統中提供使用</h3><p>透過企業購買導出顧客，你可以在他提供會員的時候，得知他的身體狀況，推薦他使用什麼，也可以看出客人分佈層。</p><p>吃瓜群眾看演講：…其實聽不太懂，聽起來其實是比較像後台管理。</p><p>評審：三圈。網站設計精細，很完整。ＣＯＤＥ碼是最多的。</p><p>以產品概念來說：比較像後台管理。並且能統整數據。</p><p>營收模式猜測：直接導入企業使用。</p><h3>9.TutorABC的另一個版本</h3><p>可以在網路上直接找到上課中寫的單字，會直接導入到網站中。並且可以尋找過去學習過的單字。</p><p>吃瓜群眾看演講：說明還算清楚，但是沒有完整說明這個網站的完整性。</p><p>評審：三叉。網站使用不友善，功能完整性不足，ＵＩ不夠好。</p><p>以產品概念來說：功能偏門且少，但是減少功能後就可以使用。</p><p>營收模式猜測：其實直接作為單字卡ＡＰＰ就好…</p><h3>10.賣紅蛋</h3><p>學習遊戲化揪團組隊，獲得任務，成就。</p><p>吃瓜群眾看演講：有趣。</p><p>評審：三圈。UI設計很好，網站有很貼心的提醒。</p><p>以產品概念來說：可能一直都是一個人…所以組隊不太了解其必要性吧？但非常有趣，非常。或許當造就了社群學習的文化，就可以引發出這個風氣。</p><p>營收模式猜測：暫無</p><p>其實我根本無法確定這些點子怎麼樣</p><p>除了前面三個，到後面我覺得不錯的評審都打叉</p><p>而評審打圈的我都覺得不行…</p><p>講好聽點是我看商機，他們看程式碼</p><p>但說不定只是銅牌永遠無法理解菁英的想法</p><p>而我是銅牌。</p><p>考慮到這種不忠肯的論點，我想還是作為個人部落格發表就好了。</p><p>畢竟我的眼光出發點是商機而非程式碼（如果作為一名觀眾）</p><p>這種這麼不負責任的言論，公開論壇發布擺明了就是討戰。</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4ac728b33d50" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[S4–3實作個人網站新版(下)]]></title>
            <link>https://medium.com/@WilliamHuu/s4-3%E5%AF%A6%E4%BD%9C%E5%80%8B%E4%BA%BA%E7%B6%B2%E7%AB%99%E6%96%B0%E7%89%88-%E4%B8%8B-4c17adb14f6f?source=rss-244ea6cdf3a0------2</link>
            <guid isPermaLink="false">https://medium.com/p/4c17adb14f6f</guid>
            <dc:creator><![CDATA[William Hu]]></dc:creator>
            <pubDate>Wed, 11 Apr 2018 10:01:28 GMT</pubDate>
            <atom:updated>2018-04-11T10:01:28.339Z</atom:updated>
            <content:encoded><![CDATA[<p>接下來繼續往下。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FDUjGnzHQlecWjC1Cao8JQ.png" /><figcaption>這是本區塊要達成的最終形態</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*g7BzQNKI42VQTlSIqQntFw.png" /><figcaption>而Wireframe則會是以這樣的型態顯示。</figcaption></figure><p>以下為HTML。</p><pre><strong>&lt;section</strong> class=&quot;my_service&quot;<strong>&gt;</strong><br>    <strong>&lt;div</strong> class=&quot;container&quot;<strong>&gt;</strong><br>      <strong>&lt;h2&gt;</strong>what i offer<strong>&lt;/h2&gt;</strong><br><br>      <strong>&lt;div</strong> class=&quot;service-items&quot;<strong>&gt;</strong><br>        <strong>&lt;div</strong> class=&quot;service-content&quot;<strong>&gt;</strong><br>          <strong>&lt;i</strong> class=&quot;fa fa-html5&quot; aria-hidden=&quot;true&quot;<strong>&gt;&lt;/i&gt;</strong><br>          <strong>&lt;h3&gt;</strong>web design and development<strong>&lt;/h3&gt;</strong><br>          <strong>&lt;p&gt;</strong>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aliquam, facere.<strong>&lt;/p&gt;</strong><br>        <strong>&lt;/div&gt;</strong><br><br>        <strong>&lt;div</strong> class=&quot;service-content&quot;<strong>&gt;</strong><br>          <strong>&lt;i</strong> class=&quot;fa fa-css3&quot; aria-hidden=&quot;true&quot;<strong>&gt;&lt;/i&gt;</strong><br>          <strong>&lt;h3&gt;</strong>web design and development<strong>&lt;/h3&gt;</strong><br>          <strong>&lt;p&gt;</strong>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aliquam, facere.<strong>&lt;/p&gt;</strong><br>        <strong>&lt;/div&gt;</strong><br><br>        <strong>&lt;div</strong> class=&quot;service-content&quot;<strong>&gt;</strong><br>          <strong>&lt;i</strong> class=&quot;fa fa-camera-retro&quot; aria-hidden=&quot;true&quot;<strong>&gt;&lt;/i&gt;</strong><br>          <strong>&lt;h3&gt;</strong>web design and development<strong>&lt;/h3&gt;</strong><br>          <strong>&lt;p&gt;</strong>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aliquam, facere.<strong>&lt;/p&gt;</strong><br>        <strong>&lt;/div&gt;</strong><br>      <strong>&lt;/div&gt;</strong><br>    <strong>&lt;/div&gt;</strong><br>  <strong>&lt;/section&gt;</strong></pre><p>接著補上CSS設定。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XRgPvah8zKxsIMbrTtPoPQ.png" /><figcaption>其實可以從這里看出，有些ＣＳＳ開始重複了。每個區塊的大定義差不多相同。</figcaption></figure><p>接下來是對內部進行設定</p><p>但是這裡也會使用到float，所以接下來也要做額外的設定了。</p><pre>.service-content {<br>  float: left;<br>  width: 33.33333333%;<br>  padding: 0 15px;<br>}<br><br>.service-content <strong>i</strong> {<br>  font-size: 30px;<br>  line-height: 46px;<br>}<br><br>.service-content <strong>h3</strong> {<br>  font-size: 16px;<br>  letter-spacing: 1px;<br>  margin-top: 13px;<br>  margin-bottom: 8px;<br>  text-transform: capitalize;<br>}<br><br>.service-content <strong>p</strong> {<br>  color: #767676;<br>  font-size: 14px;<br>  font-weight: 300;<br>  line-height: 24px;<br>}</pre><p>在section上面加入clearfix的class就可以解決了。（挺有意思，之前覺得怎麼不直接設定，原來在這裡可以直接套上設定就是減少不必要的程式碼，因為他們的特性都是重複的。）</p><p>接下來是Resume的部分</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LDTINzw0MJWom-FeySHtzA.png" /><figcaption>理想圖</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n5Yx_jxFZaO4fLC81xCJbQ.png" /><figcaption>設計圖</figcaption></figure><p>HTML Code</p><pre><em>&lt;!-- Resume --&gt;</em><br>  <strong>&lt;section</strong> class=&quot;resume&quot;<strong>&gt;</strong><br>    <strong>&lt;div</strong> class=&quot;container&quot;<strong>&gt;</strong><br>      <strong>&lt;h2&gt;</strong>resume<strong>&lt;/h2&gt;</strong><br><br>      <strong>&lt;div</strong> class=&quot;col-horizontal&quot;<strong>&gt;</strong><br>        <strong>&lt;h3</strong> class=&quot;resume-subtitle&quot;<strong>&gt;</strong>education:<strong>&lt;/h3&gt;</strong><br><br>        <strong>&lt;div</strong> class=&quot;col-item&quot;<strong>&gt;</strong><br>          <strong>&lt;p</strong> class=&quot;experience-year&quot;<strong>&gt;</strong>2001 - 2002<strong>&lt;/p&gt;</strong><br>          <strong>&lt;div</strong> class=&quot;resume-detail&quot;<strong>&gt;</strong><br>            <strong>&lt;h4&gt;</strong>computer science<strong>&lt;/h4&gt;</strong><br>            <strong>&lt;h6&gt;</strong>google university, australia<strong>&lt;/h6&gt;</strong><br>            <strong>&lt;p&gt;</strong>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Veniam atque voluptates, dignissimos, in quaerat veritatis maiores fuga dolores dolorem eius.<strong>&lt;/p&gt;</strong><br>          <strong>&lt;/div&gt;</strong><br>        <strong>&lt;/div&gt;</strong><br><br>        <strong>&lt;div</strong> class=&quot;col-item&quot;<strong>&gt;</strong><br>          <strong>&lt;p</strong> class=&quot;experience-year&quot;<strong>&gt;</strong>2002 - 2003<strong>&lt;/p&gt;</strong><br>          <strong>&lt;div</strong> class=&quot;resume-detail&quot;<strong>&gt;</strong><br>            <strong>&lt;h4&gt;</strong>google collage<strong>&lt;/h4&gt;</strong><br>            <strong>&lt;h6&gt;</strong>stanford university, BD<strong>&lt;/h6&gt;</strong><br>            <strong>&lt;p&gt;</strong>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Veniam atque voluptates, dignissimos, in quaerat veritatis maiores fuga dolores dolorem eius.<strong>&lt;/p&gt;</strong><br>          <strong>&lt;/div&gt;</strong><br>        <strong>&lt;/div&gt;</strong><br>      <strong>&lt;/div&gt;</strong><br><br>      <strong>&lt;div</strong> class=&quot;col-horizontal&quot;<strong>&gt;</strong><br>        <strong>&lt;h3</strong> class=&quot;resume-subtitle&quot;<strong>&gt;</strong>experience:<strong>&lt;/h3&gt;</strong><br><br>        <strong>&lt;div</strong> class=&quot;col-item&quot;<strong>&gt;</strong><br>          <strong>&lt;p</strong> class=&quot;experience-year&quot;<strong>&gt;</strong>2004 - 2005<strong>&lt;/p&gt;</strong><br>          <strong>&lt;div</strong> class=&quot;resume-detail&quot;<strong>&gt;</strong><br>            <strong>&lt;h4&gt;</strong>themeforest company, malibug<strong>&lt;/h4&gt;</strong><br>            <strong>&lt;h6&gt;</strong>front end developer<strong>&lt;/h6&gt;</strong><br>            <strong>&lt;p&gt;</strong>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Veniam atque voluptates, dignissimos, in quaerat veritatis maiores fuga dolores dolorem eius.<strong>&lt;/p&gt;</strong><br>          <strong>&lt;/div&gt;</strong><br>        <strong>&lt;/div&gt;</strong><br><br>        <strong>&lt;div</strong> class=&quot;col-item&quot;<strong>&gt;</strong><br>          <strong>&lt;p</strong> class=&quot;experience-year&quot;<strong>&gt;</strong>2005 - 2007<strong>&lt;/p&gt;</strong><br>          <strong>&lt;div</strong> class=&quot;resume-detail&quot;<strong>&gt;</strong><br>            <strong>&lt;h4&gt;</strong>google company, australia<strong>&lt;/h4&gt;</strong><br>            <strong>&lt;h6&gt;</strong>wordpress developer<strong>&lt;/h6&gt;</strong><br>            <strong>&lt;p&gt;</strong>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Veniam atque voluptates, dignissimos, in quaerat veritatis maiores fuga dolores dolorem eius.<strong>&lt;/p&gt;</strong><br>          <strong>&lt;/div&gt;</strong><br>        <strong>&lt;/div&gt;</strong><br>      <strong>&lt;/div&gt;</strong><br>    <strong>&lt;/div&gt;</strong><br>  <strong>&lt;/section&gt;</strong></pre><p>在我們設定CSS以前，我們先來把之前會重複的padding來統一化。</p><p>在My service和About Me其實都會出現padding:100px 0的情況。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*s_K_OG4ar7y2dXgTCzEcJA.png" /></figure><p>那不如把它設定為通用CSS？</p><p>只是在設定了以後，其他的地方必須要刪除，不然會出現兩次。</p><p>接下來繼續設定ＣＳＳ。</p><p>首先是分區塊的部分。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*P_fiUXp-KcJoQP95HUviGg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9aX_Znmvx9QENXfjai10Lw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*siy9lUoJjjVcomLjPDrL3g.png" /></figure><p>簡言意賅，加上偽屬性的last-child 是被設定成不要有border的<br>從字面上來看，還有first跟nth(第幾個)的設定。</p><p>到這裡為止看起來會是這樣的。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wK6e2z4ByDYAGAVa97VXzA.png" /><figcaption>只有區塊設定，所以看起來跟沒設計差不多。</figcaption></figure><p>接下來是各個區塊的設定。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hS85gLAB0AUi-NfAbWwk5w.png" /><figcaption>h3，本章節有兩個標題使用到</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AobiO7hUmloTBzJpzXfkmg.png" /><figcaption>區塊float來排列，並且說明某些class的命名其實常常被使用，所以需要使用到繼承</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k8BDik-MApTb0jyEGZcHyQ.png" /><figcaption>年份區塊的設計</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-zVNWsrHHJxwvbIo8mvtow.png" /><figcaption>區塊細節的設計</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GvJF_4Neig1A3RnVaHHpPg.png" /><figcaption>最後，是加入clearfix的屬性，但是這個部分看起來是有些許不同的。(clearfix是有用到float的父元素去設計的。)</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zbIT8g5lcZ1IvWtJH8n_rg.png" /><figcaption>這會是本部分完成後的樣子</figcaption></figure><p>接下來是Quotes(Freelancer的報價)這個部分在正式版本中是會被拿掉的。因為我也不接案子。但是作為展示時則是會出現。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*U4GY863MKDObIv2_o0eRng.png" /><figcaption>這是本章節完成後的樣子</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RHmM2a68vm0A1sVlVtPJWg.png" /><figcaption>overlay之前有實作過，把背景改成灰暗色，本處為wireframe。</figcaption></figure><p>HTML CODE</p><pre><em>&lt;!-- Quote --&gt;</em><br>  <strong>&lt;section</strong> class=&quot;quotes&quot;<strong>&gt;</strong><br>    <strong>&lt;div</strong> class=&quot;overlay&quot;<strong>&gt;&lt;/div&gt;</strong><br>    <strong>&lt;div</strong> class=&quot;container&quot;<strong>&gt;</strong><br>      <strong>&lt;div</strong> class=&quot;quote-inner&quot;<strong>&gt;</strong><br>        <strong>&lt;h3&gt;</strong>Let&#39;s work together!<strong>&lt;/h3&gt;</strong><br>        <strong>&lt;p&gt;</strong>I am available for freelance projects<strong>&lt;/p&gt;</strong><br>        <strong>&lt;a</strong> href=&quot;#&quot;<strong>&gt;</strong>get quotes<strong>&lt;/a&gt;</strong><br>      <strong>&lt;/div&gt;</strong><br>    <strong>&lt;/div&gt;</strong><br>  <strong>&lt;/section&gt;</strong></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Lp5BZ393cgw7FOawIDDZdg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GnGIqCmjsLIEgsf11p-Ldw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*llLmuTits1JYkBWPV_FkJw.png" /></figure><p>傳送門：<a href="https://www.w3cplus.com/css/css-specificity-things-you-should-know.html">關於特殊案例的ＣＳＳ權重說明</a></p><p>還有這部分的最後一個『視差』</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ryrLO8X3sSWqMbxi6GHnZA.png" /><figcaption>就是讓大張圖片只顯示一部份，滾動就會產生很潮的效果的那個啦。還是不知道？那自己試吧。</figcaption></figure><p>接下來要完成Lastest Work。（最近完成的作品）</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/994/1*4XwDQuceRERfb9UyGggKNw.png" /><figcaption>這是完成後的樣子</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*w979iWRmBVgHHAXGQQDrkA.png" /><figcaption>wireframe設計</figcaption></figure><p>以下為HTML CODE</p><pre><em>&lt;!-- Latest Work --&gt;</em><br>  <strong>&lt;section</strong> class=&quot;works&quot;<strong>&gt;</strong><br>    <strong>&lt;div</strong> class=&quot;container&quot;<strong>&gt;</strong><br>      <strong>&lt;h2&gt;</strong>latest work<strong>&lt;/h2&gt;</strong><br><br>      <strong>&lt;div</strong> class=&quot;work-items&quot;<strong>&gt;</strong><br>        <strong>&lt;div</strong> class=&quot;col-work&quot;<strong>&gt;</strong><br>          <strong>&lt;a</strong> href=&quot;images/portfolio/work-1.jpg&quot;<strong>&gt;</strong><br>            <strong>&lt;img</strong> src=&quot;images/portfolio/work-1.jpg&quot; alt=&quot;portfolio-1&quot;<strong>&gt;</strong><br>          <strong>&lt;/a&gt;</strong><br>        <strong>&lt;/div&gt;</strong><br><br>        <strong>&lt;div</strong> class=&quot;col-work&quot;<strong>&gt;</strong><br>          <strong>&lt;a</strong> href=&quot;images/portfolio/work-2.jpg&quot;<strong>&gt;</strong><br>            <strong>&lt;img</strong> src=&quot;images/portfolio/work-2.jpg&quot; alt=&quot;portfolio-2&quot;<strong>&gt;</strong><br>          <strong>&lt;/a&gt;</strong><br>        <strong>&lt;/div&gt;</strong><br><br>        <strong>&lt;div</strong> class=&quot;col-work&quot;<strong>&gt;</strong><br>          <strong>&lt;a</strong> href=&quot;images/portfolio/work-3.jpg&quot;<strong>&gt;</strong><br>            <strong>&lt;img</strong> src=&quot;images/portfolio/work-3.jpg&quot; alt=&quot;portfolio-3&quot;<strong>&gt;</strong><br>          <strong>&lt;/a&gt;</strong><br>        <strong>&lt;/div&gt;</strong><br><br>        <strong>&lt;div</strong> class=&quot;col-work&quot;<strong>&gt;</strong><br>          <strong>&lt;a</strong> href=&quot;images/portfolio/work-4.jpg&quot;<strong>&gt;</strong><br>            <strong>&lt;img</strong> src=&quot;images/portfolio/work-4.jpg&quot; alt=&quot;portfolio-4&quot;<strong>&gt;</strong><br>          <strong>&lt;/a&gt;</strong><br>        <strong>&lt;/div&gt;</strong><br><br>        <strong>&lt;div</strong> class=&quot;col-work&quot;<strong>&gt;</strong><br>          <strong>&lt;a</strong> href=&quot;images/portfolio/work-5.jpg&quot;<strong>&gt;</strong><br>            <strong>&lt;img</strong> src=&quot;images/portfolio/work-5.jpg&quot; alt=&quot;portfolio-5&quot;<strong>&gt;</strong><br>          <strong>&lt;/a&gt;</strong><br>        <strong>&lt;/div&gt;</strong><br><br>        <strong>&lt;div</strong> class=&quot;col-work&quot;<strong>&gt;</strong><br>          <strong>&lt;a</strong> href=&quot;images/portfolio/work-6.jpg&quot;<strong>&gt;</strong><br>            <strong>&lt;img</strong> src=&quot;images/portfolio/work-6.jpg&quot; alt=&quot;portfolio-6&quot;<strong>&gt;</strong><br>          <strong>&lt;/a&gt;</strong><br>        <strong>&lt;/div&gt;</strong><br>      <strong>&lt;/div&gt;</strong><br>    <strong>&lt;/div&gt;</strong><br>  <strong>&lt;/section&gt;</strong></pre><p>CSS樣式設定</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ivuRFWuV4CdfrMxb4sxXAw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XfS8nXzxcul1yc689H8kHw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LyzllfOf28--mjnKgDoTpg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tdlgPGwcp3H_N3TH15O2lw.png" /><figcaption>關於trans的淡變色，About me寫在hover事件上，這邊卻是直接寫在a上面，但目前記得，兩者皆能達成一樣的結果即可。</figcaption></figure><p>接下來是Contact Form(聯絡我)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Bb6Ec46qDV9nLwcixY5wLA.png" /><figcaption>這是最後要完成的樣子</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9TjnMU9cAGhUIBTY-5ZIuQ.png" /><figcaption>wireframe</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DSOBFFFqcTd58MTe8z9aSw.png" /></figure><p>HTML CODE</p><pre><em>&lt;!-- Contact --&gt;</em><br>  <strong>&lt;section</strong> class=&quot;contact&quot;<strong>&gt;</strong><br>    <strong>&lt;div</strong> class=&quot;container&quot;<strong>&gt;</strong><br>      <strong>&lt;h2&gt;</strong>get in touch<strong>&lt;/h2&gt;</strong><br><br>      <strong>&lt;div</strong> class=&quot;contact-form&quot;<strong>&gt;</strong><br>        <strong>&lt;form</strong> action=&quot;&quot;<strong>&gt;</strong><br>          <strong>&lt;div</strong> class=&quot;form-input&quot;<strong>&gt;</strong><br>            <strong>&lt;input</strong> type=&quot;text&quot; name=&quot;name&quot; class=&quot;form-style&quot; placeholder=&quot;input your name&quot; required<strong>&gt;</strong><br>          <strong>&lt;/div&gt;</strong><br><br>          <strong>&lt;div</strong> class=&quot;form-input&quot;<strong>&gt;</strong><br>            <strong>&lt;input</strong> type=&quot;email&quot; name=&quot;email&quot; class=&quot;form-style&quot; placeholder=&quot;enter your email&quot; required<strong>&gt;</strong><br>          <strong>&lt;/div&gt;</strong><br><br>          <strong>&lt;div</strong> class=&quot;form-input&quot;<strong>&gt;</strong><br>            <strong>&lt;textarea</strong> name=&quot;textarea&quot; id=&quot;message&quot; cols=&quot;30&quot; rows=&quot;10&quot; placeholder=&quot;write message&quot; required<strong>&gt;&lt;/textarea&gt;</strong><br>          <strong>&lt;/div&gt;</strong><br><br>          <strong>&lt;div</strong> class=&quot;form-submit&quot;<strong>&gt;</strong><br>            <strong>&lt;input</strong> type=&quot;submit&quot; name=&quot;submit&quot; value=&quot;submit&quot;<strong>&gt;</strong><br>          <strong>&lt;/div&gt;</strong><br>        <strong>&lt;/form&gt;</strong><br>      <strong>&lt;/div&gt;</strong><br>    <strong>&lt;/div&gt;</strong><br>  <strong>&lt;/section&gt;</strong></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1010/1*-f5-75WR9z79Yd1GCcvA_A.png" /><figcaption>關於html的額外說明</figcaption></figure><p>接下來是ＣＳＳ</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*O3MkhZaA78tyNTNhKLfnDQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Yp3rI5cvDSEANi0uzsa2rw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dCJ5BFVoiblpz092vLrLUQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*a9GaL-Pe8XlCNog_qPrLAw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*D-oFoq3PHnQeMYalcF3s3g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jgp77RMVkcx5Z76SycF-6g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yHYAVflPoMNq2n3bDV7L8A.png" /></figure><p>在最後，則是FOOTER的設定。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kN4TtBTnLbVchc8Pi5tdcw.png" /><figcaption>該部分完成後要長這樣</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*D2FAjYuvPldgEHb39hTbyw.png" /><figcaption>分解成wireframe後的樣子</figcaption></figure><p>以下為HTML CODE</p><pre><em>&lt;!-- Footer --&gt;</em><br>  <strong>&lt;footer</strong> id=&quot;footer&quot;<strong>&gt;</strong><br>    <strong>&lt;div</strong> class=&quot;container&quot;<strong>&gt;</strong><br>      <strong>&lt;div</strong> class=&quot;footer-content&quot;<strong>&gt;</strong><br>        <strong>&lt;p&gt;&amp;copy;</strong> 2017 ALPHA Camp | All Rights Reserved.<strong>&lt;/p&gt;</strong><br>        <strong>&lt;div</strong> class=&quot;footer-social-icon&quot;<strong>&gt;</strong><br>          <strong>&lt;ul&gt;</strong><br>            <strong>&lt;li&gt;</strong><br>              <strong>&lt;a</strong> href=&quot;&quot;<strong>&gt;&lt;i</strong> class=&quot;fa fa-facebook&quot; aria-hidden=&quot;true&quot;<strong>&gt;&lt;/i&gt;&lt;/a&gt;</strong><br>              <strong>&lt;a</strong> href=&quot;&quot;<strong>&gt;&lt;i</strong> class=&quot;fa fa-twitter&quot; aria-hidden=&quot;true&quot;<strong>&gt;&lt;/i&gt;&lt;/a&gt;</strong><br>              <strong>&lt;a</strong> href=&quot;&quot;<strong>&gt;&lt;i</strong> class=&quot;fa fa-github-alt&quot; aria-hidden=&quot;true&quot;<strong>&gt;&lt;/i&gt;&lt;/a&gt;</strong><br>              <strong>&lt;a</strong> href=&quot;&quot;<strong>&gt;&lt;i</strong> class=&quot;fa fa-skype&quot; aria-hidden=&quot;true&quot;<strong>&gt;&lt;/i&gt;&lt;/a&gt;</strong><br>              <strong>&lt;a</strong> href=&quot;&quot;<strong>&gt;&lt;i</strong> class=&quot;fa fa-linkedin&quot; aria-hidden=&quot;true&quot;<strong>&gt;&lt;/i&gt;&lt;/a&gt;</strong><br>            <strong>&lt;/li&gt;</strong><br>          <strong>&lt;/ul&gt;</strong><br>        <strong>&lt;/div&gt;</strong><br>      <strong>&lt;/div&gt;</strong><br>    <strong>&lt;/div&gt;</strong><br>  <strong>&lt;/footer&gt;</strong></pre><p>接下來是CSS設定</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rhUgClloeIdguOBfiZlQfg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Y3cUmyjq9GbD9hUwuGstPQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4OUM9tOlzISyud5IAZMqAw.png" /></figure><p>最後的錨點（一頁式網站點擊跳轉區域）</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nMR1b12Djngt0Wt1KqSADg.png" /><figcaption>第一步：在每個區塊加上屬於自己的ＩＤ</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YXICgD2F-121QFHGPIkGWg.png" /><figcaption>直接在導覽列加入＃ＩＤ，事實上這麼簡單確實有些出乎意料。(但是捲動效果就要倚賴Jquery了。)</figcaption></figure><p>字體設定</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/660/1*RtHG5emHyshsNVI07_EWbA.png" /><figcaption>這次採用Montserrat字體</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/962/1*3o6h2FXyRFTFMSwmoPVVUw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*laFHRM6BIWu77_OgvCmc3A.png" /></figure><p><a href="https://fonts.google.com/?query=Montserrat&amp;selection.family=Montserrat">GOOGLE FONTS 連結</a></p><p>簡易結論：</p><ol><li>ＣＳＳ格局都是從大設定到小（比如一開始的width:85%）</li><li>將會重複使用到的css先設定完成（ＳＥＣＴＩＯＮ）</li><li>細部分化設計則倚賴於經驗，但是以此為藍本將是很好的參考範本。</li></ol><p>不擅長的ＣＳＳ中於結束了…</p><p>雖然好像還沒結束的樣子。</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4c17adb14f6f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[S4–2實作個人網站新版(上)]]></title>
            <link>https://medium.com/@WilliamHuu/s4-2%E5%AF%A6%E4%BD%9C%E5%80%8B%E4%BA%BA%E7%B6%B2%E7%AB%99%E6%96%B0%E7%89%88-%E4%B8%8A-32290d728e14?source=rss-244ea6cdf3a0------2</link>
            <guid isPermaLink="false">https://medium.com/p/32290d728e14</guid>
            <dc:creator><![CDATA[William Hu]]></dc:creator>
            <pubDate>Fri, 30 Mar 2018 04:02:20 GMT</pubDate>
            <atom:updated>2018-03-30T04:02:20.111Z</atom:updated>
            <content:encoded><![CDATA[<p>新版本發布了</p><p>而前端特別是關於CSS的概念也一直都是我的硬傷。</p><p>另外再發一篇，來把特性都寫一遍。</p><p>此部分構成:wireframe，NAVBAR，大封面，還有About me 的自我介紹。</p><p>初始:wireframe</p><p>也就是所謂的線稿，草稿</p><p>會幫助你釐清版面設計，提高工作效率。</p><p>第一步:Header，section，footer</p><p>Header為導覽列(NAVBAR)</p><p>Section則是全部內容</p><p>Footer則是尾端(包括版權聲明，聯絡等等)</p><p>此步的狀態為:</p><pre><strong>&lt;body&gt;</strong><br>  <strong>&lt;header&gt;</strong>Header<strong>&lt;/header&gt;</strong><br>  <strong>&lt;section&gt;</strong>Home image<strong>&lt;/section&gt;</strong><br>  <strong>&lt;section&gt;</strong>About me<strong>&lt;/section&gt;</strong><br>  <strong>&lt;section&gt;</strong>What I offer<strong>&lt;/section&gt;</strong><br>  <strong>&lt;section&gt;</strong>Resume<strong>&lt;/section&gt;</strong><br>  <strong>&lt;section&gt;</strong>Quote<strong>&lt;/section&gt;</strong><br>  <strong>&lt;section&gt;</strong>Latest work<strong>&lt;/section&gt;</strong><br>  <strong>&lt;section&gt;</strong>Contact<strong>&lt;/section&gt;</strong><br>  <strong>&lt;footer&gt;</strong>Footer<strong>&lt;/footer&gt;</strong><br><strong>&lt;/body&gt;</strong></pre><p>第二步:Header的設計NAVBAR</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*khQy6gk9BTem9MV2nq4fBA.png" /></figure><pre><strong>&lt;header</strong> id=&quot;header&quot;<strong>&gt;</strong><br>    <strong>&lt;div</strong> class=&quot;container&quot;<strong>&gt;</strong><br>      <strong>&lt;nav&gt;</strong><br>        <strong>&lt;div</strong> id=&quot;logo&quot;<strong>&gt;</strong><br>          <strong>&lt;img</strong> src=&quot;images/logo.png&quot; alt=&quot;logo&quot;<strong>&gt;</strong><br>        <strong>&lt;/div&gt;</strong><br><br>        <strong>&lt;ul</strong> class=&quot;nav&quot;<strong>&gt;</strong><br>          <strong>&lt;li&gt;</strong>home<strong>&lt;/li&gt;</strong><br>          <strong>&lt;li&gt;</strong>about<strong>&lt;/li&gt;</strong><br>          <strong>&lt;li&gt;</strong>service<strong>&lt;/li&gt;</strong><br>          <strong>&lt;li&gt;</strong>portfolio<strong>&lt;/li&gt;</strong><br>          <strong>&lt;li&gt;</strong>contact<strong>&lt;/li&gt;</strong><br>        <strong>&lt;/ul&gt;</strong><br>      <strong>&lt;/nav&gt;</strong><br>    <strong>&lt;/div&gt;</strong><br>  <strong>&lt;/header&gt;</strong></pre><p>此處大致為這樣</p><p>進一步加上超連結</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AEjzYuTlGq_tEOFdeYixMg.png" /></figure><p>完成了HTML的預計設計</p><p>接下來是加入CSS樣式</p><p>第三步:加入CSS樣式(通用)</p><pre><strong>html</strong>, <strong>body</strong> {<br>  width: 100%;<br>  height: 100%;<br>}<br><br><strong>body</strong> {<br>  padding: 0px;<br>  margin: 0px;<br>  font-size: 14px; //固定尺寸為14px<br>  line-height: 1.42857143;  //行與行之間的高度<br>  color: #333; <br>  background-color: #fff;<br>}<br><br><strong>*</strong> {<br>  box-sizing: border-box;<br>  //近代出現的屬性，加上此設定和特性，會把額外的padding和border一起算在總寬度裡面(也就是說，在這個設定前提下如果你在100px的div加入了20px的border，寬度會變成60px，剩下得40px(左右兩邊合計)會被border所使用)<br>  //w3s的範例:<a href="https://www.w3schools.com/cssref/tryit.asp?filename=trycss3_box-sizing">https://www.w3schools.com/cssref/tryit.asp?filename=trycss3_box-sizing</a></pre><pre>}<br><br><strong>h1</strong>, <strong>h2</strong>, <strong>h3</strong>, <strong>h4</strong>, <strong>h5</strong>, <strong>h6</strong>, <strong>p</strong> {<br>  margin: 0px;<br>  padding: 0px;<br>}<br><br><strong>ul</strong>, <strong>ol</strong> {<br>  list-style: none; //會把ul和ol的條列(數字或點點)去除掉(NAV BAR要用)<br>  margin: 0px;<br>  padding: 0px;<br>}<br><br><strong>a</strong>, <strong>a</strong>:hover, <strong>a</strong>:focus {<br>  margin: 0px;<br>  padding: 0px;<br>  text-decoration: none; //a屬性屬標一道上的的時候會出現底線，這個是移除特性(NAVBAR要用)<br>}<br><br><strong>img</strong> {<br>  width: 100%;<br>  height: auto;<br>  display: block; //用於自動換行，inline會疊在同一行<br>}<br><br>.container {<br>  width: 85%;<br>  max-width: 1170px;<br>  margin: 0 auto; //自動至中<br>  position: relative;<br>}</pre><p>這是通用會擁有的CSS特性(裡面只有我不懂的部分會加上註解)</p><p>第四步:設定Header(此處只放了Navbar)</p><pre><strong>header</strong> {<br>  position: fixed; //固定在某個位置上(不因為捲動滾輪而改變)<br>  width: 100%;<br>  left: 0; //父元素為body，距離左邊為零<br>  right: 0; //父元素為body，距離右邊為零<br>  background-color: #222;<br>  z-index: 100; //避免被蓋掉 Z位數要給高一點<br>}</pre><p>接著設定NavBar的元素(LOGO)</p><pre>#logo {<br>  float: left;//靠左<br>}</pre><p>再來是NAV的元素(在這裡要注意是擁有class=nav的元素而不是nav這個元素)</p><pre>.nav {<br>  float: right;//靠右<br>}<br><br>.nav <strong>li</strong> {<br>  display: inline-block; //全部靠在一起<br>}<br><br>.nav <strong>li</strong> <strong>a</strong> {<br>  color: #fff;<br>  text-transform: capitalize; //大寫<br>  display: block;<br>  padding: 10px 12px;<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*T4ufRqetcMEFzxOsalp4fw.png" /></figure><p>第五步:設定自我介紹(大綱)區塊</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*w2s99e0YLOUFlwIyarcJqw.png" /></figure><p>此處為垂直致中的設計方式</p><pre><strong>&lt;body&gt;</strong><br>  <em>&lt;!-- 其他 HTML 語法 --&gt;</em><br><br>  <em>&lt;!-- Homepage Background Image --&gt;</em><br>  <strong>&lt;section</strong> class=&quot;home_bg&quot;<strong>&gt;</strong><br>    <strong>&lt;div</strong> class=&quot;container_table&quot;<strong>&gt;</strong><br>      <strong>&lt;div</strong> class=&quot;container_table_cell&quot;<strong>&gt;</strong><br>        <strong>&lt;h2&gt;</strong>hi, i am eric<strong>&lt;/h2&gt;</strong><br><br>        <strong>&lt;div</strong> class=&quot;social_icons&quot;<strong>&gt;</strong><br>            <strong>&lt;a</strong> href=&quot;&quot;<strong>&gt;&lt;i</strong> class=&quot;fa fa-facebook&quot; aria-hidden=&quot;true&quot;<strong>&gt;&lt;/i&gt;&lt;/a&gt;</strong><br>            <strong>&lt;a</strong> href=&quot;&quot;<strong>&gt;&lt;i</strong> class=&quot;fa fa-twitter&quot; aria-hidden=&quot;true&quot;<strong>&gt;&lt;/i&gt;&lt;/a&gt;</strong><br>            <strong>&lt;a</strong> href=&quot;&quot;<strong>&gt;&lt;i</strong> class=&quot;fa fa-github-alt&quot; aria-hidden=&quot;true&quot;<strong>&gt;&lt;/i&gt;&lt;/a&gt;</strong><br>            <strong>&lt;a</strong> href=&quot;&quot;<strong>&gt;&lt;i</strong> class=&quot;fa fa-skype&quot; aria-hidden=&quot;true&quot;<strong>&gt;&lt;/i&gt;&lt;/a&gt;</strong><br>            <strong>&lt;a</strong> href=&quot;&quot;<strong>&gt;&lt;i</strong> class=&quot;fa fa-linkedin&quot; aria-hidden=&quot;true&quot;<strong>&gt;&lt;/i&gt;&lt;/a&gt;</strong><br>         <strong>&lt;/div&gt;</strong><br>      <strong>&lt;/div&gt;</strong><br>    <strong>&lt;/div&gt;</strong><br>  <strong>&lt;/section&gt;</strong><br><strong>&lt;/body&gt;</strong></pre><p>HTML的初步設計是這樣的。</p><p>接下來是加入CSS設置。</p><p>首先要加入背景圖片的CSS設定。</p><pre>.home_bg {<br>  background-image: url(https://medium.com/images/profile.jpg);<br>  background-size: cover; //將背景圖放大至實際畫面大小<br>  background-position: center; //設置在中央<br>  background-repeat: no-repeat; //不重複顯示<br>  width: 100%;<br>  height: 100%;<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5FlPSgYg5jv1H3SxyAd-qA.png" /></figure><p>接下來是.container_table的設定</p><pre>.container_table {<br>  display: table; //模式是table，  讓我們接下來可以對 container_table 所包覆的東西設定垂直置中。<br>  width: 100%;<br>  height: 100%;<br>  position: relative; //位置是相對<br>}</pre><p>把要垂直至中(是垂直至中，水平至中只要配margin: 0px auto 然後設定一個寬度給他固定PX(或是最大PX)就能達到水平至中效果)的物品塞在一個被定義為TABLE的CSS特性，就可以做後續的垂直至中，至少對我來說是很新鮮的一件事情。</p><p>接下來是對其底下的元素進行設定</p><pre>.container_table_cell {<br>  display: table-cell; //把其設定為表格內容<br>  text-align: center; //水平至中<br>  vertical-align: middle; //垂直至中<br>}<br><br>.container_table_cell <strong>h2</strong> {<br>  color: #fff;<br>  text-transform: capitalize;<br>  font-size: 54px;<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/854/1*zR7j37oFIPlhXIrLpw2PSg.png" /></figure><p>這樣看起來如果想要把某個區塊垂直至中...</p><ol><li>把外面設定為(display:table)，以及額外的設定</li><li>把內部要至中的元素設定為(display:table-cell)</li><li>再加上水平和垂直的至中元素(text-align:center)(vertical-align:center)</li></ol><p>最後，加上ICON的設定。</p><pre>.social_icons <strong>a</strong> {<br>  color: #fff;<br>  display: inline-block;<br>  width: 30px;<br>  height: 40px;<br>  line-height: 40px;<br>  font-size: 19px;<br>  margin-right: 7px;<br>}</pre><p>inline-block的重複出現頻率已經可以視為並列的基本性質設定了</p><p>最後一個步驟，把背景上上深色的屬性(以下為完成前和完成後)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4dkctUSJrDavFKIGViUeEw.png" /></figure><p>首先是HTML(在背景html後面立刻加上)</p><pre><strong>&lt;section</strong> class=&quot;home_bg&quot;<strong>&gt;</strong><br>    <strong>&lt;div</strong> class=&quot;overlay&quot;<strong>&gt;&lt;/div&gt;</strong><br><br>    <em>&lt;!-- 其他 HTML 語法 --&gt;</em><br>  <strong>&lt;/section&gt;</strong></pre><p>接著去設定CSS檔案</p><pre>.overlay {<br>  background: rgba(0, 0, 0, 0.5); //顏色改為半透明黑色<br>  position: absolute; //固定位置<br>  left: 0;<br>  top: 0;<br>  width: 100%;<br>  height: 100%;<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mcSW50kPPl1WKiwMfTRClQ.png" /></figure><p>第六步:關於我區塊的詳細介紹(新的部分)</p><p>這次下一個全新區域的設計。</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/846/1*W-BOE9rAlswk_G-SMCp7ew.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Lj25TchNA5_u6ZHrXidlgA.png" /></figure><p>最困難的大概就是第一個</p><p>第一個設計完之後，第二個去設計，元素使用就能比較駕輕就熟。</p><p>以下為本區塊的新HTML</p><pre><em>&lt;!-- 其他 HTML 語法 --&gt;</em><br><br>  <em>&lt;!-- About Me --&gt;</em><br>  <strong>&lt;section</strong> class=&quot;about_me&quot;<strong>&gt;</strong><br>    <strong>&lt;div</strong> class=&quot;container&quot;<strong>&gt;</strong><br>      <strong>&lt;h2&gt;</strong>about me<strong>&lt;/h2&gt;</strong><br><br>      <strong>&lt;div</strong> class=&quot;summary&quot;<strong>&gt;</strong><br>        <strong>&lt;div</strong> class=&quot;col-left&quot;<strong>&gt;</strong><br>          <strong>&lt;div</strong> class=&quot;avatar&quot;<strong>&gt;</strong><br>            <strong>&lt;img</strong> src=&quot;images/me.jpg&quot; alt=&quot;avatar&quot;<strong>&gt;</strong><br>          <strong>&lt;/div&gt;</strong><br>        <strong>&lt;/div&gt;</strong><br><br>        <strong>&lt;div</strong> class=&quot;col-right&quot;<strong>&gt;</strong><br>          <strong>&lt;div</strong> class=&quot;personal-info&quot;<strong>&gt;</strong><br>            <strong>&lt;h3&gt;</strong>hello!<strong>&lt;/h3&gt;</strong><br>            <strong>&lt;p&gt;</strong>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Distinctio fugit maiores facere consequatur omnis ipsa recusandae possimus aspernatur totam illum aliquam excepturi beatae veniam Lorem ipsum dolor sit amet, consectetur.<strong>&lt;/p&gt;</strong><br>          <strong>&lt;/div&gt;</strong><br><br>          <strong>&lt;div</strong> class=&quot;skill&quot;<strong>&gt;</strong><br>            <strong>&lt;ul&gt;</strong><br>              <strong>&lt;li&gt;</strong>html5 and css3<strong>&lt;/li&gt;</strong><br>              <strong>&lt;li&gt;</strong>responsive website design<strong>&lt;/li&gt;</strong><br>              <strong>&lt;li&gt;</strong>ruby on rails<strong>&lt;/li&gt;</strong><br>            <strong>&lt;/ul&gt;</strong><br>          <strong>&lt;/div&gt;</strong><br><br>          <strong>&lt;div</strong> class=&quot;button-group&quot;<strong>&gt;</strong><br>            <strong>&lt;div</strong> class=&quot;download_cv&quot;<strong>&gt;</strong><br>              <strong>&lt;a</strong> href=&quot;&quot;<strong>&gt;</strong>download CV<strong>&lt;/a&gt;</strong><br>            <strong>&lt;/div&gt;</strong><br>            <strong>&lt;div</strong> class=&quot;hire_me&quot;<strong>&gt;</strong><br>              <strong>&lt;a</strong> href=&quot;&quot;<strong>&gt;</strong>hire me<strong>&lt;/a&gt;</strong><br>            <strong>&lt;/div&gt;</strong><br>          <strong>&lt;/div&gt;</strong><br>        <strong>&lt;/div&gt;</strong><br>      <strong>&lt;/div&gt;</strong><br>    <strong>&lt;/div&gt;</strong><br>  <strong>&lt;/section&gt;</strong></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*W_8TVt_WVmCbYRyRJ8Rv3g.png" /></figure><p>lorem+TAB鍵可以產生範例文字</p><p>以及上面有一部份提到的placeholder.com(用來產生尺寸圖片)</p><p><a href="http://via.placeholder.com/350x150"><strong>http://via.placeholder.com/350x150</strong></a></p><p>可以像這樣後面加上此吋就能產生藍圖了</p><p>首先先加入上下的空格差距</p><pre>.about_me {<br>  padding: 100px 0;<br>}</pre><p>接下來是h2的設計</p><pre><strong>h2</strong> {<br>  margin-bottom: 75px;<br>  text-align: center;<br>  font-size: 40px;<br>  line-height: 50px;<br>  text-transform: uppercase;<br>  letter-spacing: 2px;<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/511/1*tqEiAERBCJmozPzARuZpAg.png" /></figure><p>接下來是區塊的左側，右側的設定</p><pre>.col-left, .col-right {<br>  float: left;<br>  width: 50%;<br>  padding: 0 15px;<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*N47llHxqQe7Q1F6t9Tskzw.png" /></figure><p>個人資訊區塊</p><pre>.personal-info <strong>h3</strong> {<br>  font-size: 15px;<br>  letter-spacing: 2px;<br>  margin-bottom: 6px;<br>  text-transform: capitalize;<br>}<br><br>.personal-info <strong>p</strong> {<br>  color: #767676;<br>  line-height: 24px;<br>  text-align: justify;<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/916/1*jNxTUddgvWqiDSWnHDqIfQ.png" /></figure><p>接下來是技能欄</p><pre>.skill {<br>  margin: 30px auto;<br>}<br><br>.skill <strong>li</strong> {<br>  font-size: 15px;<br>  line-height: 35px;<br>  text-transform: capitalize;<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/916/1*jNxTUddgvWqiDSWnHDqIfQ.png" /></figure><p>以及下載履歷和雇用我的按鈕</p><pre>.button-group .download_cv, .button-group .hire_me {<br>  display: inline-block;<br>}<br><br>.button-group .download_cv {<br>  margin-right: 18px;<br>}<br><br>.button-group <strong>a</strong> {<br>  display: block;<br>  color: #000;<br>  border: 1px solid #333;<br>  border-radius: 10px;<br>  padding: 10px 38px;<br>  text-transform: capitalize;<br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kOXrKtQil6ay707zm6_dvg.png" /></figure><p>接下來是按鈕的效果（ＨＯＶＥＲ）</p><pre>.button-group <strong>a</strong>:hover {<br>  background: #000;<br>  color: #fff;<br>  -webkit-transition: all .4s linear;<br>  -moz-transition: all .4s linear;<br>  -ms-transition: all .4s linear;<br>  -o-transition: all .4s linear;<br>  transition: all .4s linear;<br>}</pre><p>padding會失效，因為col.left和col.right有了float的效果，會變成『便利貼』一般的效果，所以貼在section上面當然不會算在上下padding裡面。(也就是夾在藍色區塊上下的綠色區塊只有夾到AboutME那一小塊，下面的部分變成類似便利貼的方式貼在上面了)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/605/1*Wqk-6ZFj6Q7dWDMYJjUOtA.png" /></figure><p>所以還要額外添加一個屬性設定。</p><pre><strong>&lt;section</strong> class=&quot;about_me clearfix&quot;<strong>&gt; //clearfix 一個額外的class</strong><br>    <em>&lt;!-- 其他 HTML 語法 --&gt;</em><br>  <strong>&lt;/section&gt;</strong></pre><p>以下是對clearfix加入的額外屬性：</p><p>content一定要有內容（包括空白，讓ＣＳＳ屬性好整理。）</p><p>偽元素pseudo-element，這對於ＣＳＳ乾淨似乎是很重要的一點。</p><pre>.clearfix::after {<br>  content: &#39;&#39;;<br>  display: table;<br>  clear: both;<br>}</pre><p>設定完畢後，這個部分就算完成了。</p><p>接下來還有下半部。</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=32290d728e14" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[S4–1實作你的個人網站]]></title>
            <link>https://medium.com/@WilliamHuu/s4-1%E5%AF%A6%E4%BD%9C%E4%BD%A0%E7%9A%84%E5%80%8B%E4%BA%BA%E7%B6%B2%E7%AB%99-46eb91e7070a?source=rss-244ea6cdf3a0------2</link>
            <guid isPermaLink="false">https://medium.com/p/46eb91e7070a</guid>
            <dc:creator><![CDATA[William Hu]]></dc:creator>
            <pubDate>Thu, 08 Mar 2018 18:13:46 GMT</pubDate>
            <atom:updated>2018-03-08T18:13:46.771Z</atom:updated>
            <content:encoded><![CDATA[<p>久違了，好久不見。</p><p>回到『S4實作你的個人靜態網頁』吧。</p><p>這次網頁也改版了許多。</p><p>本篇網誌以個人新學習到的技術為主。</p><p>首先請先參考<a href="http://gitbook.tw/chapters/command-line/command-line.html">終端機常用指令</a></p><p>平常都是直接在Atom裡面新增，只是未來考慮到開發主流方式</p><p>還是早點習慣用cmd比較好</p><p>=========置中=======</p><p>margin: 0 auto</p><p>把div設定要有px，就能完成基本的置中。</p><p>=========Float=======</p><p>簡單來說：三個div</p><p>一個(1)float:left,一個(2)float:right</p><p>最後一個(3)clear:both</p><p>(1)會在左邊（靠左）(2)會靠右邊（靠右）(3)會在(1)(2)下方（左右邊都要清空放置）</p><p>附帶一提，如果(1)有Float:left(2)卻沒有，(2)會蓋在(1)上面。</p><p>=========position=========</p><p>position:relative 以視窗左上角作為基準</p><p>position:absolute 以『上一層』做為參考基準。</p><p>比如說如果Ｂ放在Ａ盒子裡面，Ａ沒有任何設定，那麼Ｂ就算輸入absolute，還是會以視窗左上角作為判斷依據</p><p>但是如果在A盒子輸入：position:relative</p><p>那B盒子就會以Ａ盒子作為基準了去改變位置。</p><p>最後一個position:fixed</p><p>是固定在螢幕上，你把它往下捲，他的空白也會一直固定在那裡。</p><p>最後是z-index，是類似一個Ｚ軸的概念，一般來說默認都是z-index:0</p><p>如果顏色區塊的z-index比文字區塊小，那就會變成底色的概念。</p><p>只不過現在這個時代，position的概念使用的越來越少了…</p><p>只有在某些『固定導覽』的狀態下才可能會使用到這個概念（而且以fixed居多，個人猜測。）</p><p>=========ul,li並排的原則===========</p><p>在bootstrap 裡面的nav為何可以併排？</p><p>在最基本的ul 底下li 的css設定中裡面輸入</p><p>『display: inline-block;』</p><p>讓他們直接並排</p><p>『list-style-type: none;』</p><p>則是把li的樣式隱藏起來（前面的點點會不見）</p><p>這樣子看起來，把W3S的CSS屬性字典看過一次還是比較恰當的。</p><p>（目前只看了一半，HTML全部看完，事實上很多情況已經幫了我不少忙。）</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=46eb91e7070a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[S4-關於CSS]]></title>
            <link>https://medium.com/@WilliamHuu/%E9%97%9C%E6%96%BCcss-2d4f62b34d89?source=rss-244ea6cdf3a0------2</link>
            <guid isPermaLink="false">https://medium.com/p/2d4f62b34d89</guid>
            <dc:creator><![CDATA[William Hu]]></dc:creator>
            <pubDate>Wed, 25 Oct 2017 15:22:48 GMT</pubDate>
            <atom:updated>2017-11-19T10:43:05.043Z</atom:updated>
            <content:encoded><![CDATA[<p>html對於已經有一年從業經驗的人來說，是真的太簡單太基本了。</p><p>如果有需要特別講解的，請再聯絡我，謝謝。</p><p>CSS這個部分只說課程中的display,置中的方式。</p><p>先說display</p><p>簡單來說，display如果是inline</p><p>可以容許別的元件跟自己放在同一行</p><p>而block會全部都隔開</p><p>當然，如果是在block的div裡面的元素是inline</p><p>那怎麼改都沒事情了。</p><p>上下的margin會重疊</p><pre>style=&#39;padding-top: 1px&#39;</pre><p>可以做出一個隱性分隔，就能正確分隔了。</p><p>再來是置中</p><p>一般的是text-align:center就可以了</p><p>但是div不行，有效的置中手段是：</p><p>margin:0 center就可以了。</p><p>但是div一定要被賦予寬度（如果沒賦予就不會有任何效果。）</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2d4f62b34d89" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[S3-什麼是「網路應用程式」]]></title>
            <link>https://medium.com/@WilliamHuu/%E4%BB%80%E9%BA%BC%E6%98%AF-%E7%B6%B2%E8%B7%AF%E6%87%89%E7%94%A8%E7%A8%8B%E5%BC%8F-9609467fc8fc?source=rss-244ea6cdf3a0------2</link>
            <guid isPermaLink="false">https://medium.com/p/9609467fc8fc</guid>
            <dc:creator><![CDATA[William Hu]]></dc:creator>
            <pubDate>Mon, 23 Oct 2017 15:36:40 GMT</pubDate>
            <atom:updated>2017-11-19T10:42:36.749Z</atom:updated>
            <content:encoded><![CDATA[<p>就我的理解，軟體是拿來寫『應用程式』的（或是使用範圍廣泛）</p><p>（ＥＸ：Windows,MacOS）</p><p>而應用程式則是達成特定功能。</p><p>（ＥＸ：ＬＩＮＥ，ＧＭＡＩＬ）</p><p>而程式碼寫的，都是程式。</p><p>就我的解讀，用使用範圍的廣泛與否（為了達成特定目的）是一個很好的判斷準則。</p><p>而網路應用程式，就是在瀏覽器上面就可以打開。</p><p>不再需要下載下來執行。</p><p>ＥＸ：桌機版的outlook對瀏覽器的ＧＭＡＩＬ</p><p>還有：</p><ul><li>你能夠在 Facebook 或 Twitter 等社群平台和人們進行各式各樣的互動</li><li>你能夠在 Amazon 或博客來的網站上查詢所有的書籍，並立刻購買</li><li>你能夠在 Google Map 查詢即時路況，並根據你的 GPS 定位來選擇交通路線</li><li>你能夠在 AirBnb 找到附近的空房、聯絡上房間主人；</li><li>你能夠在 Netflix 觀看影片</li></ul><p>網路應用程式的簡易架構：</p><p>back-end:網站運作邏輯（ＥＸ：輸入內容判斷是否為數字）</p><p>front-end（ＥＸ：這個圖片要靠哪邊放）</p><p>database（ＥＸ：從資料庫中找出是否有帳號和密碼相同的內容（確認登入））</p><p>API 這個部分很像是你把資料丟出去，然後對方會接收你的資訊後，處理完畢後再丟一串回來給你。（以業界的標準來說的話。）</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9609467fc8fc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[S3-網路如何運作]]></title>
            <link>https://medium.com/@WilliamHuu/10-22-%E7%B6%B2%E8%B7%AF%E5%A6%82%E4%BD%95%E9%81%8B%E4%BD%9C-762788a0c9d9?source=rss-244ea6cdf3a0------2</link>
            <guid isPermaLink="false">https://medium.com/p/762788a0c9d9</guid>
            <dc:creator><![CDATA[William Hu]]></dc:creator>
            <pubDate>Mon, 23 Oct 2017 14:34:26 GMT</pubDate>
            <atom:updated>2017-11-19T10:41:46.905Z</atom:updated>
            <content:encoded><![CDATA[<p>久違了，時隔一個月。</p><p>在新工作被搞到灰頭土臉</p><p>明明新工作比這邊花了更久時間</p><p>進步的幅度卻沒有這邊的快</p><p>只能說工作就是在產出啊。</p><p>能透過工作成長那是運氣好。</p><p>回到主題吧。</p><p>雖然有些東西對我來說可能是看了就能馬上理解的東西</p><p>但是為了避免關鍵時候找不到資料，還是把每一個章節可以寫成筆記的部份都寫下來。</p><p>那麼，開始吧。</p><ul><li>想知道設備位置時，就用一種叫 <strong>IP (Internet Protocol)</strong> 的溝通模式</li><li>在瀏覽網站時，就用一種叫 <strong>HTTP (HyperText Transfer Protocol)</strong> 的溝通模式</li><li>在傳輸檔案時，就用一種叫 <strong>FTP (File Transfer Protocol)</strong> 的溝通模式</li><li>在寄信件時，就用一種叫 <strong>SMTP (Simple Mail Transfer Protocol, SMTP)</strong> 的溝通模式</li></ul><p>ＩＰ：代表網站的“絕對位置”，例如忠孝東路174號2巷</p><p>ＤＮＳ：就是網站名稱（俗稱）來做判定，例如台北101</p><p>ＴＣＰ：傳輸控制協定，很大的檔案會被一包一包的傳輸，透過路由器找出路徑，只有確認全部的檔案都到齊了，（根據ＩＰ管理是否已經到齊了）才可以成為一個能被播放的檔案。</p><ul><li><strong>GET請求</strong>：「給我網頁好嗎？」</li><li><strong>POST請求</strong>：「我可以在你們家貼一下我的留言嗎？」</li><li><strong>PATCH請求</strong>：「有個字打錯了，改一下。」</li><li><strong>DELETE請求</strong>：「我剛講了廢話，幫我刪掉。」</li></ul><p>如果我要登入ＦＢ，就是先透過ＤＮＳ取得臉書的ＩＰ，然後輸入我的帳號資訊後ＰＯＳＴ出去，接著那邊確認沒問題後，再讓我ＧＥＴ網站的內容。</p><h3>「客戶端－伺服器端」 (Client — Server) 架構</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*esk47kKwA75R2rdB1nUsYg.png" /></figure><p>使用者端會以html顯示，而伺服器端就是程式碼配對資料庫顯示。</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=762788a0c9d9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[S2-leetcode被打臉的歷程（下）]]></title>
            <link>https://medium.com/@WilliamHuu/leetcode%E8%A2%AB%E6%89%93%E8%87%89%E7%9A%84%E6%AD%B7%E7%A8%8B-%E4%B8%8B-69154458e942?source=rss-244ea6cdf3a0------2</link>
            <guid isPermaLink="false">https://medium.com/p/69154458e942</guid>
            <dc:creator><![CDATA[William Hu]]></dc:creator>
            <pubDate>Mon, 25 Sep 2017 13:13:36 GMT</pubDate>
            <atom:updated>2017-11-19T10:45:02.989Z</atom:updated>
            <content:encoded><![CDATA[<p>接下來是下篇。因為上篇被打臉打太腫，只打三篇。</p><p>這篇因為被打過的臉都差不了，所以需要打出來的其實不多。</p><p>希望這篇能清楚我自己在打什麼。</p><p>＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝＝</p><p>第四題</p><p>4.Move Zeroses</p><p>本章節善用了第2題的章節</p><blockquote>能使用現成的便使用，先查詢沒有再自己寫</blockquote><p>但有個小插曲。</p><p>array -=[0]是把陣列中的零扣掉的意思</p><p>本地編輯器可以用，但是在leetcode不行</p><p>要換成array.delete(0)才給過</p><p>所以真要說請記得一件事情，也是這題我被打臉的地方</p><blockquote>你寫的語言代碼換了個地方或平台可能是不會通的，請做好準備</blockquote><p>比如有些瀏覽器html支援清單跟日曆的內建功能，但是有一些沒有，那你就得自己寫</p><p>（在Chrome上面跑得出東西，在IE跑同樣的程式碼就會GG）</p><p>本題到此結束。</p><p>=================================</p><p>5.本題最大收穫：</p><blockquote>你發展好奇心尋找一個東西時，會用分支狀的方式散開，一題裡面你可以能會多學到很多新用法。</blockquote><blockquote>同時，GOOGLE你問得越細，他能給的答案就越顯明。</blockquote><p>比如這題我第一個想到的是把字串排序，直接sort卻發現有ＥＲＲＯＲ</p><p>後面又查到chars，才知道chars是可以把字串陣列化之類的東西。</p><p>當我只找chars ruby的時候，很快的我就知道答案了。</p><p>但如果你問很長一串，甚至丟出一串問題時，Google就很難幫上你了。</p><p>所以把問題拆成小塊狀再去Google，會是很重要的一環。</p><p>=============================</p><p>6.這題就是把理論代碼化完全打爆了我的臉。</p><p>（雖然在pesudocode上很快就解出來了）</p><p>這題跟第一題相反，第一題的代碼很簡單，構思很困難。</p><p>===============================</p><p>7.本題封印了某些很好用的指令，這題這題考的語法反而很少，解題速度也算很快。</p><p>===============================</p><p>8.本題特別加上了時間限制，反過來說就是土法煉鋼的作法是不行的。</p><p>（一個一個找，不如一半一半拆）</p><p>最後看了解答，原本的構思卻又得以實現，所以這題到底是怎麼了我也不知道…</p><p>================================</p><p>9.放棄思考的一題，只能說這題很有趣，運用某些指令本身的特性來完成這個目的，這題我思考了一下最後選擇看解答。</p><p>================================</p><p>10.比起第九題相對的簡單了不少，很快就找出答案。</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=69154458e942" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>