小编Min*_*ina的帖子

CSS 位置:固定 - 背景颜色消失

这是示例: https: //jsfiddle.net/5ahw3tec/

超文本标记语言

html body {
    margin: 0;
    padding: 0;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    text-decoration: none;
    font-family: 'Noto Sans KR', sans-serif;
    list-style: none;
}

    a {
    text-decoration: none;
}

    body {
    background: lightgrey;
    margin: 0;
}

    .container {
    background-color: #ffffff;
    width: 1280px;
    padding: 0;
}

    #gnb {
    width: 1280px;
    height: 80px;
    z-index: 100;
    position: fixed;
}

    #gnb .header-area img {
    position: relative;
    top: 25px;
    left: 80px;
}

    #gnb .header-area nav {
    position: relative;
    width: 930px;
    left: 280px; …
Run Code Online (Sandbox Code Playgroud)

css fixed css-position

2
推荐指数
1
解决办法
2万
查看次数

标签 统计

css ×1

css-position ×1

fixed ×1