瀏覽了教程http://www.sohtanaka.com/web-design/facebook-style-footer-admin-panel-part-1/並試圖製作一個固定的頂部欄(就像Facebook,Twitter,techCrunch和其他任何熱門網站一樣),但是欄放大失敗。位置:固定 - 內容消失縮放
下面是我的意思的示例 - http://rtabl.es/designingforstartups - 如果放大該鏈接,則可以看到右側的內容從屏幕上消失。同樣的事情與我發生的事情,我不想讓內容在縮放消失..
這裏的測試代碼,後面的教程,並給了容器position:fixed
和內容有position:relative
與float:left
- 想知道我會錯的。
代碼 -
<html>
<style type="text/css">
#Contianer{
position: fixed;
height: 35px;
width: 100%;
z-index: 9999;
color: white;
background-color: #474747;
}
.x{
float: left;
text-align: center;
position: relative;
line-height: 35px;
border:1px solid white;
}
#a{
width:20%;
text-align: left;
min-width: 100px;
}
#b{
width:20%;
min-width: 100px;
text-align: left;
height: 35px;
display: table-cell;
}
#c{
min-width: 200px;
width:40%;
}
#d,#e{
min-width: 50px;
width:10%;
}
body{
border:0;
margin: 0;
}
</style>
<body>
<div class="Contianer" id="Contianer">
<div id="a" class="x">
foo
</div>
<div id="b" class="x">
bar
</div>
<div id="c" class="x">
tom
</div>
<div id="d" class="x">
jerry
</div>
<div id="e" class="x">
Out
</div>
</div>
</body>
試圖與UL替換div的(用於集裝箱)和李對內容,力似乎工作。即使在縮放後,教程中的底部欄仍保持良好狀態。 –
不僅縮放,而且縮小瀏覽器窗口的大小也會隱藏它們。 –
是的,它希望找到一個工作或知道我要去哪裏錯了.. –