【问题标题】:CSS responsive layout, with elements fluid and fixedCSS 响应式布局,元素流动和固定
【发布时间】:2013-08-30 14:27:17
【问题描述】:

我需要一点帮助,我正在为 Wordpress 开发一个自定义主题:http://bjorn.flabifitness.hu/

我需要一个固定的页眉、页脚、菜单区域。以及带有页面内容(图像)的流畅内容区域。

在浏览器窗口大小变化期间,只需将内容更改/调整为view-size,不带滚动条,如果图​​片大于浏览器窗口或显示器,则应调整为浏览器窗口。 (流体)

页眉、页脚和菜单(垂直位置)应位于同一位置。 (固定)

这是我现在的 CSS 代码:(主要:所有页面、内部页眉、容器(侧边栏、内容)、页脚)

#main {
    position: absolute;
    background-color:#434343;
    z-index:0;
    display: block;
    opacity: 0;
    top:0px;
    left:0px;
    width:100%;
    height:100%;
    text-rendering: optimizeLegibility;
}
#header {
    background: #1d1d1d;
    margin: 0;
    padding-top: 15px;
    padding-left: 35px;
    padding-bottom: 13px;
    min-width: 100%;
    margin:0px auto;
}
#footer {
    clear: both;
    min-width: 100%;
}
#container {
    height: auto;
    overflow: hidden;
}

#sidebar {
    width: 242px;
    float: left;
    background: #434343;
    min-height: 92%;
}

#content {
    float: none;
    background: #434343;
    width: auto;
    overflow: hidden;
}

【问题讨论】:

    标签: css wordpress responsive-design containers fluid-layout


    【解决方案1】:

    您可以像这样使用 CSS 流畅地缩放图像:

    img {
      width: 100%;
      height: auto;
    }
    

    【讨论】:

    • 大家好!它几乎可以工作,但我还需要将图像(内容)附加到页脚。窗口底部的页脚,所以结论图像应该单独更改/调整,在调整窗口大小期间,可以解决吗?
    猜你喜欢
    • 1970-01-01
    • 2014-09-12
    • 2014-12-25
    • 1970-01-01
    • 2012-05-01
    • 2012-01-05
    • 1970-01-01
    • 2012-11-15
    • 2015-07-28
    相关资源
    最近更新 更多