0

我有一个包含 2 行 3 个链接的页脚 - 当浏览器窗口调整大小并且太小时,链接会被切断。有没有办法在调整窗口的其余部分大小时保持页脚全尺寸?

.footer { position: fixed; top: 90%; left: 0; right: 0; bottom: 0;
      background: #ffffff; border: solid black; border-width: 2px 0 0 0; } 
4

3 回答 3

0

为您的 div 设置“最小宽度”

.footer { 
    position: fixed; 
    top: 90%; 
    left: 0; 
    right: 0; 
    bottom: 0;
    background: #fff; 
    border-top: 2px solid #000;

    min-width: 200px;
} 
于 2013-03-20T15:14:12.603 回答
0

将 a 添加到页脚,如下min-height所示:

.footer { 
    position: fixed; 
    height: 10%;
    min-height: 40px;
    left: 0; 
    right: 0; 
    bottom: 0;
    background: #fff; 
    border-top: 2px solid black; 
}
于 2013-03-20T15:17:14.593 回答
0

将页脚固定到页面底部是一种选择吗?只需删除,top: 90%;即使窗口为一半大小,页脚也会保留它的高度

.footer { 
    position: fixed; 
    left: 0; 
    right: 0; 
    bottom: 0;
    background: #fff; 
    border-top: 2px solid #000;
} 

PS我叉了你的小提琴:http: //jsfiddle.net/6s5eN/

于 2013-03-20T15:40:26.573 回答