用純css做置中效果 紅色死神 發表於 2013年8月12日 星期一 8月 12, 2013 / 沒有留言 標籤 css 剛好看到有人分享的,就做一下筆記,沒有什麼高深的技術,這招學起來還算有用。 Demo 記得要用一層東西把div包起來,並把他的position設為relative就好了,然後在要置中的div寫這樣的css view plaincopy to clipboardprint.Absolute-Center { width: 50%; height: 50%; overflow: auto; margin: auto; position: absolute; top: 0; left: 0; bottom: 0; right: 0; } 還有其他的用法,可以參考這篇 Absolute Centering in CSS 以電子郵件傳送這篇文章BlogThis!分享至 Twitter分享至 Facebook 反應:
0 意見:
張貼留言