【问题标题】:Fixing sidebar on my project在我的项目上修复侧边栏
【发布时间】:2014-09-20 12:39:40
【问题描述】:

我在修复项目右侧的侧边栏时遇到问题。你可以看看here 所以导航和侧边栏需要修复,只需要滚动主要内容 它需要看起来像这样:

#sidebar { background-color: #EEEEEE; float: right; width: 451px; height: 100%; position: fixed;} 

如果有人有解决方案,我将不胜感激

【问题讨论】:

标签: html css css-float fixed


【解决方案1】:

其实很简单。而你并没有完全关闭。请在此处查看fiddle

HTML

<div class="sidebar">
</div>

CSS

.sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    right: 0;
    width:100px;
    background: red;
    z-index:10;
}

【讨论】:

  • 谢谢你,你帮了我很多。显然我需要了解更多:D
猜你喜欢
  • 2021-09-28
  • 2019-04-30
  • 2021-12-12
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2021-04-20
相关资源
最近更新 更多