• 博客园logo
  • 会员
  • 周边
  • 新闻
  • 博问
  • 闪存
  • 众包
  • 赞助商
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
zzzzzzz
博客园 首页 新随笔 联系 订阅 订阅 管理

随笔分类 -  css

 
css position static | absolute | fixed | relative
摘要:box1 box2 box3 box41. 所有div为block, 且默认position:static2. position: fixed#box2 { position: fixed; right: 50px; bottom: 0px;}box2脱离文档流,相对浏览器窗口进行定位,拖动窗口,也保持右下侧的位置不变。z-index属性有效。3. position: absolute;#box3 { position: absolute; left: 30px; top: 100px;}box3 脱离文档流,相对于父级元素定位,若上级元素的position为fixed或abso... 阅读全文
posted @ 2013-10-12 11:33 meredith.z 阅读(269) 评论(0) 推荐(0)
 

公告


博客园  ©  2004-2026
浙公网安备 33010602011771号 浙ICP备2021040463号-3