list-type-style:none不删除项目符号

时间:2015-06-23 02:13:32

标签: html css

我无法从导航元素中删除子弹点。

HTML代码

<!DOCTYPE html>
<html> 
    <head>
        <title>Yu-Gi-Oh! Stash</title>
        <link rel="stylesheet" type="text/css" href="styles/style.css">
        <meta charset="utf-8">
    </head>

    <body>        
        <section>
            <nav>
                <ul>
                    <li><a href="#decks">Decks &blacktriangledown;</a></li>
                    <li><a href="#booster-packs">Booster Packs &blacktriangledown;</a></li>
                    <li><a href="#promotion">Promotions &blacktriangledown;</a></li>
                    <li><a href="#limited-edition">Limited Editions &blacktriangledown;</a></li>
                    <li><a href="#premium-packs">Premium Packs &blacktriangledown;</a></li>
                </ul>
            </nav>
        </section>

        <footer>
        </footer>
    </body>
</html>

CSS代码

body, html {
    padding: 0;
    margin: 0;
}

p {
    padding: 0;
    margin: 8px;
}

section {
    padding: 0;
    margin: auto;
    width: 85%;
    height: 1000px;
    /*border: 1px solid grey;*/
    /*background-color: black;*/
}

/********************
 ***NAVIGATION BAR***
 ********************/
nav {
    position: fixed;
    width: inherit;
    list-style-type: none !important;
    border: 2px solid #F0F0F0;
    border-top: none;
    -webkit-border-bottom-left-radius: 5px;
    -moz-border-radius-bottomleft: 5px;
    border-bottom-left-radius: 5px;
    -webkit-border-bottom-right-radius: 5px;
    -moz-border-radius-bottomright: 5px;
    border-bottom-right-radius: 5px;
}

navn ul {
    list-style-type: none !important;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

nav ul li {
    float: left;
    margin-right: 25px;
}

nav a:link, a:visited {
    display: inline-block;
    width: auto;
    font-weight: bold;
    font-size: 16px;
    font-family: Arial, sans-serif;
    color: #0099CC;
    text-align: center;
    padding: 4px;
    text-decoration: none;
    text-transform: capitalize;
    border: 1px solid #F0F0F0;
    border-bottom: none;
    background-color: rgba(240, 240, 240, 0.2);

    -webkit-border-top-left-radius: 5px;
    -moz-border-radius-topleft: 5px;
    border-top-left-radius: 5px;
    -webkit-border-top-right-radius: 5px;
    -moz-border-radius-topright: 5px;
    border-top-right-radius: 5px;
}

nav a:hover, a:active {
    color: #00688B;
}

我很抱歉,如果这个问题之前已被多次询问过,但我找不到能帮助解决问题的答案。如果您有任何提示可以解决这个问题,请告诉我!

1 个答案:

答案 0 :(得分:2)

不是 navn ,而是 nav ul

nav ul {
    list-style-type: none !important;
    margin: 0;
    padding: 0;
    overflow: hidden;
}