Skip to content

Instantly share code, notes, and snippets.

@Rplus
Last active February 24, 2016 02:06
Show Gist options
  • Save Rplus/7671448 to your computer and use it in GitHub Desktop.
Save Rplus/7671448 to your computer and use it in GitHub Desktop.

漸層 bgi
background-image linear-gradient


讓CSS正確顯示中文字體 http://benlibra.blogspot.tw/2011/04/css.html

escape('微軟正黑體').replace(/%u/g, '\\');

=> "\5FAE\8EDF\6B63\9ED1\9AD4"


multiline ellipsis

http://zetajames.wordpress.com/2012/02/13/text-overflow/ text-overflow: ellipsis; at multi-line

{
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 6; /* 第六行要顯示點點點 */
  -webkit-box-orient: vertical;
}

Learn CSS Positioning in Ten Steps (en) http://www.barelyfitz.com/screencast/html-training/css/positioning/ (zh) http://www.see-design.com.tw/i/css_position.html

<select>
  <option disabled selected style="display: none;">請選擇</option>
  <option value="xxx">第一項</option>
</select>

效果: 預設會 selected 到第一項

  • disabled: 但點開後第一項便會被略過無法選取
  • display: none;: 下拉選單中該項隱藏

適合需要提示用的 select

@Rplus
Copy link
Author

Rplus commented Dec 10, 2015

http://navnav.co/
很多選單的 demo
layout

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment