http://css-tricks.com/all-about-floats/
http://www.impressivewebs.com/clearing-floats-why-necessary/
http://stackoverflow.com/questions/12871710/why-clear-both-css/12871734#12871734
2014年8月31日 星期日
讓div container能自動調整大小,以容納float children
http://stackoverflow.com/questions/16493456/parent-height-doesnt-follow-their-float-children
http://stackoverflow.com/questions/804926/make-outer-div-be-automatically-the-same-height-as-its-floating-content
http://stackoverflow.com/questions/9463069/grow-height-of-parent-div-that-contains-floating-nested-divs
http://stackoverflow.com/questions/804926/make-outer-div-be-automatically-the-same-height-as-its-floating-content
http://stackoverflow.com/questions/9463069/grow-height-of-parent-div-that-contains-floating-nested-divs
2014年8月26日 星期二
2014年8月25日 星期一
讓bootstrap的column等高的方法
http://stackoverflow.com/questions/19695784/how-can-i-make-bootstrap-columns-all-the-same-height
.row {
overflow: hidden;
}
[class*="col-"] {
margin-bottom: -99999px; /* 讓overflow發生 */
padding-bottom: 99999px; /* 讓padding-bottom超長,藉此拉長背景 */
}
如果不懂為何可以這樣的話,可以試著把overflow: hidden去掉,這樣也許就可以理解了
(當並排的區塊元素需要等高時,都可以用這招)
2014年8月24日 星期日
CSS pixel & Device pixel
1.
At zoom level 100% one CSS pixel is exactly equal to one device pixel.
2.
Zooming as implemented in modern browsers consists of nothing more than “stretching up” pixels. That is, the width of the element is not changed from 128 to 256 pixels; instead the actual pixels are doubled in size. Formally, the element still has a width of 128 CSS pixels, even though it happens to take the space of 256 device pixels.
以上節錄自http://www.quirksmode.org/
At zoom level 100% one CSS pixel is exactly equal to one device pixel.
2.
Zooming as implemented in modern browsers consists of nothing more than “stretching up” pixels. That is, the width of the element is not changed from 128 to 256 pixels; instead the actual pixels are doubled in size. Formally, the element still has a width of 128 CSS pixels, even though it happens to take the space of 256 device pixels.
以上節錄自http://www.quirksmode.org/
對CSS, JS跨平台有完整探討的網站
http://www.quirksmode.org/
此外,http://www.quirksmode.org/mobile/裡面的The three viewports系列文章是鑽研CSS排版必讀的文章
此外,http://www.quirksmode.org/mobile/裡面的The three viewports系列文章是鑽研CSS排版必讀的文章
2014年8月4日 星期一
session_set_cookie_params()
session_set_cookie_params()要在session_start()之前呼叫
session_set_cookie_params()是"當client沒有傳session key時,設定cookie為參數所指定的值"
換句話說,當使用者下一次瀏覽該頁面時,因為client會傳session key給server,所以session_set_cookie_params()並不會更新cookie lifetime
得用setcookie()更新cookie lifetime
session_set_cookie_params()是"當client沒有傳session key時,設定cookie為參數所指定的值"
換句話說,當使用者下一次瀏覽該頁面時,因為client會傳session key給server,所以session_set_cookie_params()並不會更新cookie lifetime
得用setcookie()更新cookie lifetime
訂閱:
意見 (Atom)