【问题标题】:How to make the right sidebar static in a two column layout如何在两列布局中使右侧边栏静态
【发布时间】:2013-02-01 10:15:16
【问题描述】:

在此 wordpress 主题中滚动时,如何使右侧边栏列保持静态?

http://foxnet.fi/demot/live-wire/2012/02/25/two-columns-content-left/

我想要一个像

这样的功能

http://thenextweb.com/microsoft/2013/02/15/messengers-skpe/?fromcat=all

在页面滚动到底部之前,右侧栏应始终位于页面上。

【问题讨论】:

  • 与position:fixed;.
  • @Vucko :如果我使用固定属性,它会影响主题的响应性吗?当使用固定属性时,它会与左侧对齐并在我滚动时放置在页脚上。
  • @user632347,类似于position:fixed;width:380px;right:230px;。
  • @Vucko:我可以在响应式设计中使用固定尺寸吗?
  • @user632347 这取决于你如何使用它。如果您已经在使用 % ,则必须输入position:fixed;width:25%;right:14%; 之类的内容。

标签: html css two-column-layout


【解决方案1】:

在 css-tricks 网站上的 persistent headers 上阅读这篇文章。我想您将需要对代码进行一些更改,但这应该不会太麻烦。

【讨论】:

    猜你喜欢
    • 2013-02-01
    • 2019-05-17
    • 1970-01-01
    • 2012-05-14
    • 1970-01-01
    • 2021-12-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多