jquery部落格純css類比淘寶詳細頁面底部固定

來源:互聯網
上載者:User

jquery部落格,前兩天有朋友問怎麼整頂部固定的?
之前做過底部固定,其實原理一樣,把之前代碼中的bottom改成top,is ok了。
這個主要是純css整的,IE9,Firefox,Google都沒什麼問題,其他太匆忙,沒看。
先把代碼放出來
body {margin:0; padding:0 10px 0 10px; border:0; height:100%; overflow:auto;} #menu {right:0; top:0; width:100%; position:fixed; padding:10px; text-align:center; font-weight:bold; background:#ccc;}
* html #menu {position:absolute; right:16px; top:0;}
html {overflow:auto !important; overflow:hidden;}
線上效果代碼DEMO

轉自 jquery http://www.jqueryba.com/387.html

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.