关注前端开发
关注用户体验

仿天涯底部固定漂浮导航

有 些东西找起来很麻烦,好用的又不太容易找到,之前看到很多用JS写的,固定漂浮这种效果拖动时难免会产生抖动自己对CSS还是蛮有好感的,找来找去找到了 天涯,仔细一看是纯CSS的,没有使用JS效果我觉得它比之前看到的要精简些不用嵌套多余的DIV 简单的看一下CSS样式部分:

body { background-image:url(text.txt); /* for IE6 */

background-attachment:fixed; }

#bottomNav { background-color:#096; z-index:999; position:fixed; bottom:0; left:0; width:100%; _position:absolute; /* for IE6 */_top: expression(documentElement.scrollTop + documentElement.clientHeight-this.offsetHeight); /* for IE6 */ overflow:visible; }

HTML部分加上这个id为 #bottomNav 的DIV即可:

<div id=”bottomNav”>固定漂浮物在此处O(∩_∩)O~</div>

赞(0)
未经允许不得转载:大前端 » 仿天涯底部固定漂浮导航
分享到: 更多 (0)

评论 10

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
  1. #10

    yangın kapısı firmalarının arasında en idaalı yangın çıkış kapısı firması olarak yangın kapısında çok iddalı fiyatlar ile sizlerin hizmetinizdeyiz. Ucuz yangın kapısı imalatı, Sahibinden yangın Kapısı ynagın merdiveni Kapısı

  2. #9

    This is so good to see. We have do more things like this for other families. They are protecting us and we need to support them in this way.

  3. #8

    Yangın Çıkış Kapısı, Yangın Merdiveni Kapısı Olarakta Bilinmektedir. Ucuz Yangın Kapısı Firması, Yangın Kapıları İstanbul, Yangın Kapısı Fiyatları en ucuza

  4. #7

    Just wanna remark on few general things, The website style is ideal, the topic matter is rattling good

  5. #6

    when i was still in high school, i always planned to take pyschology because it gives me great interest*

    Nonton Anime2周前 (05-10)回复
  6. #5

    Your current article normally have got much of really up to date info. Where do you come up with this? Just stating you are very imaginative. Thanks again

    cat care3周前 (05-09)回复
  7. #4

    I agree with all the ideas which you presented in your post. They are really convincing and will certainly work. But the positions are too short for novices. Could you please expand a little next time? Thanks for the post.

    pokerrepublik3周前 (05-03)回复
  8. #3

    Pretty! This was an incredibly wonderful article. Many thanks for supplying these details.

    DMC52个月前 (03-31)回复
  9. #2

    Hi man, .This is an excellent page for such a tough subject to discuss. I look forward to reading more great posts like these. Cheers

    my singing monsters2个月前 (03-28)回复
  10. #1

    这个不是扯淡吗?
    [:12]

    enuobear9年前 (2010-08-27)回复

themebetter 国内更好的WordPress主题服务商

立即前往