fancyBox 的 Quick product view 進階修改

這幾天重新碰一下 fancyBox
發現有幾個新應用不錯

叫做 Quick product view

看 source 裡面有 codepen 的 連結

剛好這次的需求,要多一個直向與橫向的呈現要不一樣

就自己 fork 了一個 版本來貼給大家看

主要是透過CSS去調整版型

@media screen and (orientation: portrait) {
   /* Top block will contain the gallery */
   .fancybox-stage {
     height: 52%;
     background: #fff;
   }
 /* Bottom block - close button and the form */
   .fancybox-form-wrap {
     position: absolute;
     left: 40px;
     right: 40px;
     bottom: 0;
     height: 48%; 
     background: #fff;
   }
 }
 @media screen and (orientation: landscape) {
   /* Left block will contain the gallery */
   .fancybox-stage {
     width: 52%;
     background: #fff;
   }
 /* Right block - close button and the form */
   .fancybox-form-wrap {
     position: absolute;
     top: 40px;
     right: 0;
     bottom: 40px;
     width: 48%; 
     background: #fff;
   }
 }

orientation: portrait 為直向的版型,上面是圖,下面是文字

orientation: landscape 為橫向版型,左邊是圖,右邊是文字,(這個demo原來就是這樣放)

PS:

附上這個 CSS屬性的 說明與版本適用表

有興趣想知道更多版型分享也歡迎留言或是到我的TG群組發問唷

10個關於Responsive Design的提示

這10點被製作在這張圖片上面
一開始列出2010年跟2012年各地區的手機流量
接著是10點提示

  1. 保持你的版面簡單 (KEEP YOUR LAYOUT SIMPLE)
  2. 使用媒體查詢 (USE MEDIA QUERIES) + MOST FREQUENT RESOLUTIONS
  3. 定義中斷點 (DEFINE THE BREAKPOINTS)
  4. 讓你的版型更靈活 (MAKE YOUR LAYOUT FLEXIBLE)
  5. 正確呈現你的圖片 (MAKE YOUR PICTURES BEHAVE)
  6. 別忘記 MAX & MIN (DON’T FORGET MAX&MIN)
  7. 產生最好的相對性內容 (MAKE MOST THINGS RELATIVE)
  8. 當使用手機端,要線性思考設計 (WHEN MOBILE LINEARIZE)
  9. 省略非必要的內容 (SKIP THE NON ESSENTIAL CONTENT)
  10. 確認你的META VIEWPORT (CHECK YOUR META VIEWPORT)

閱讀全文 10個關於Responsive Design的提示

使用一致的社交登入按鈕【Social Buttons for Bootstrap】

剛好看到 HackMD – Markdown 協作筆記 的社交登入按鈕

五個社交平台都是一致的按鈕
就想說用『btn btn-lg btn-block btn-social btn-facebook
去搜尋一下看看會找到甚麼 【我的預設搜尋已經改為 duckduckgo.com 了】
閱讀全文 使用一致的社交登入按鈕【Social Buttons for Bootstrap】

Favicon (最愛圖示) 產生器

之前一直沒有特別注意過這個問題
關於 favicon 的設定語法,因為不同使用裝置
會有對應的使用圖示,為了滿足所有瀏覽器與裝置的需求
就問了一下Google大神 (之前有印象有favicon產生器)

Favicon Generator for all platforms: iOS, Android, PC/Mac…
http://realfavicongenerator.net/

閱讀全文 Favicon (最愛圖示) 產生器

Bootstrap v4.0 的進度【241/366】

  • 2015.08.19 – Bootstrap 4 alpha 1
  • 2015.12.08 – Bootstrap 4 alpha 2
  • 2016.07.27 – Bootstrap 4 Alpha 3

官方也有說到

The general development and release plan looks something like this:

  • A few alpha releases while things are still in flux.
  • Two beta releases after features and functionality are locked down to really test things out.
  • Two release candidates (RCs) to really test things out closer to production environments.
  • Then, the final release!

閱讀全文 Bootstrap v4.0 的進度【241/366】