猿问

为什么这个nav会掉下来呢?

我给#main加的margin-top啊 为什么#nav会掉下来?

<!DOCTYPE html><html><head>
    <title></title>
    <style type="text/css">
    *{margin:0 ;padding:0}    html, body {        position: relative;        height: 100%;
    }    html{-webkit-text-size-adjust:none;}    #nav{width: 100%;height: 50px;background-color: blue;position: fixed;z-index: 999999999;}    #main{min-height: 100%;width: 100%;margin-top: 50px}    </style></head><body><div id="nav"></div><div id="main"></div></body></html>


Smart猫小萌
浏览 883回答 2
2回答
随时随地看视频慕课网APP
我要回答