CSS3和HTML5导航错误

CSS3和HTML5导航错误,html,css,web,Html,Css,Web,这是我正在处理的当前问题,正如您所看到的,导航完全是乱七八糟的。除主页外的每个链接在正常链接左侧都有一个额外的空框。看看我的代码,看看是否有快速修复方法?(还不能贴照片,但如果你想看,我有一张) html5: <!doctype html> <html lang="en"> <head> <meta charset="utf-8" /> <title>ChonBonStudios</tit

这是我正在处理的当前问题,正如您所看到的,导航完全是乱七八糟的。除主页外的每个链接在正常链接左侧都有一个额外的空框。看看我的代码,看看是否有快速修复方法?(还不能贴照片,但如果你想看,我有一张)

html5:

<!doctype html>
<html lang="en">

    <head>
        <meta charset="utf-8" />
        <title>ChonBonStudios</title>
        <link rel="stylesheet" href="Main.css">

        <!-- Including the Lobster font from Google's Font Directory -->
        <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Lobster" />

        <!-- Enabling HTML5 support for Internet Explorer -->
        <!--[if lt IE 9]>
            <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
        <![endif]-->
    </head>

    <body>
        <div id="Website">
            <header>
                <div id="Logo">
                    <a href="ChonBonStudios-Home.html"><img id="Company"   src="ChonBonStudios Logo.png"></a>
                </div>
            </header>

            <ul class="fancyNav">
                <li id="home"><a href="ChonBonStudios-Home.html" class="homeIcon" >Home</a></li>
                <li id="about"><a href="ChonBonStudios-About.html"><li>About</a></li>
                <li id="android"><a href="ChonBonStudios-Android.html"><li>Android Products</a></li>
                <li id="apple"><a href="ChonBonStudios-Apple.html"><li>Apple Products</a></li>
                <li id="computer"><a href="ChonBonStudios-Computer.html"><li>Computer Services</a></li>
                <li id="youtube"><a href="ChonBonStudios-Youtube.html"><li>Youtube</a></li>
                <li id="contact"><a href="ChonBonStudios-Contact.html"><li>Contact Us</a></li>
            </ul>

            <section>
            </section>

            <aside>
            </aside>
        </div>

        <div id="MainFooter">
            <footer>
                Copyright Austin Choncek 2013
            </footer>
        </div>

    </body>
</html> 

css3:
    body{
        background-color: #625D5D;
        margin: 0px;
        padding: 0px;
        font-family: Comic Sans MS;
        font-style: normal;
        font-size: 14px;
        color: #1cf1cb;
    }

    #Website{
        background-color: #fd4c1d;
        width: 1000px;
        border: #1a1a1a solid 2px;
        border-bottom: none;
        border-top: none;
        margin-left: auto;
        margin-right: auto;
        margin-top: 0px;
        padding: 10px 0 0 0;
    }

    #Logo{
        display: block;
        margin-top: 0px;
        margin-left: auto;
        margin-right: auto;
        padding: 0px;
        border: none;
        width: 690px;
        height: 60px;
    }

    .fancyNav{
        /* Affects the UL element */
        overflow: hidden;
        display: inline-block;
    }

    .fancyNav li{
        /* Specifying a fallback color and we define CSS3 gradients for the major browsers: */

        background-color: #f0f0f0;
        background-image: -webkit-gradient(linear,left top, left bottom,from(#fefefe), color-stop(0.5,#f0f0f0), color-stop(0.51, #e6e6e6));
        background-image: -moz-linear-gradient(#fefefe 0%, #f0f0f0 50%, #e6e6e6 51%);
        background-image: -o-linear-gradient(#fefefe 0%, #f0f0f0 50%, #e6e6e6 51%);
        background-image: -ms-linear-gradient(#fefefe 0%, #f0f0f0 50%, #e6e6e6 51%);
        background-image: linear-gradient(#fefefe 0%, #f0f0f0 50%, #e6e6e6 51%);

        border-right: 1px solid rgba(9, 9, 9, 0.125);

        /* Adding a 1px inset highlight for a more polished efect: */

        box-shadow: 1px -1px 0 rgba(255, 255, 255, 0.6) inset;
        -moz-box-shadow: 1px -1px 0 rgba(255, 255, 255, 0.6) inset;
        -webkit-box-shadow: 1px -1px 0 rgba(255, 255, 255, 0.6) inset;

        position:relative;

        float: left;
        list-style: none;
    }

    .fancyNav li:after{

        /* This creates a pseudo element inslide each LI */ 

        content:'.';
        text-indent:-9999px;
        overflow:hidden;
        position:absolute;
        width:100%;
        height:100%;
        top:0;
        left:0;
        z-index:1;
        opacity:0;

        /* Gradients! */

        background-image:-webkit-gradient(linear, left top, right top, from(rgba(168,168,168,0.5)),color-stop(0.5,rgba(168,168,168,0)), to(rgba(168,168,168,0.5)));
        background-image:-moz-linear-gradient(left, rgba(168,168,168,0.5), rgba(168,168,168,0) 50%, rgba(168,168,168,0.5));
        background-image:-o-linear-gradient(left, rgba(168,168,168,0.5), rgba(168,168,168,0) 50%, rgba(168,168,168,0.5));
        background-image:-ms-linear-gradient(left, rgba(168,168,168,0.5), rgba(168,168,168,0) 50%, rgba(168,168,168,0.5));
        background-image:linear-gradient(left, rgba(168,168,168,0.5), rgba(168,168,168,0) 50%, rgba(168,168,168,0.5));

        /* Creating borders with box-shadow. Useful, as they don't affect the size of the element. */

        box-shadow:-1px 0 0 #a3a3a3,-2px 0 0 #fff,1px 0 0 #a3a3a3,2px 0 0 #fff;
        -moz-box-shadow:-1px 0 0 #a3a3a3,-2px 0 0 #fff,1px 0 0 #a3a3a3,2px 0 0 #fff;
        -webkit-box-shadow:-1px 0 0 #a3a3a3,-2px 0 0 #fff,1px 0 0 #a3a3a3,2px 0 0 #fff;

        /* This will create a smooth transition for the opacity property */

        -moz-transition:0.25s all;
        -webkit-transition:0.25s all;
        -o-transition:0.25s all;
        transition:0.25s all;
    }
    /* Treating the first LI and li:after elements separately */

    .fancyNav li:first-child{
        border-radius: 4px 0 0 4px;
    }

    .fancyNav li:first-child:after,
    .fancyNav li.selected:first-child:after{
        box-shadow:1px 0 0 #a3a3a3,2px 0 0 #fff;
        -moz-box-shadow:1px 0 0 #a3a3a3,2px 0 0 #fff;
        -webkit-box-shadow:1px 0 0 #a3a3a3,2px 0 0 #fff;

        border-radius:4px 0 0 4px;
    }

    .fancyNav li:last-child{
        border-radius: 0 4px 4px 0;
    }

    /* Treating the last LI and li:after elements separately */

    .fancyNav li:last-child:after,
    .fancyNav li.selected:last-child:after{
        box-shadow:-1px 0 0 #a3a3a3,-2px 0 0 #fff;
        -moz-box-shadow:-1px 0 0 #a3a3a3,-2px 0 0 #fff;
        -webkit-box-shadow:-1px 0 0 #a3a3a3,-2px 0 0 #fff;

        border-radius:0 4px 4px 0;
    }

    .fancyNav li:hover:after,
    .fancyNav li.selected:after,
    .fancyNav li:target:after{
        /* This property triggers the CSS3 transition */
        opacity:1;
    }

    .fancyNav:hover li.selected:after,
    .fancyNav:hover li:target:after{
        /* Hides the targeted li when we are hovering on the UL */
        opacity:0;
    }

    .fancyNav li.selected:hover:after,
    .fancyNav li:target:hover:after{
        opacity:1 !important;
    }

     /* Styling the anchor elements */

    .fancyNav li a{
        color: #5d5d5d;
        display: inline-block;
        font: 20px/1 Lobster,Arial,sans-serif;
        padding: 12px 35px 14px;
        position: relative;
        text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.6);
        z-index:2;
        text-decoration:none !important;
        white-space:nowrap;
    }

    .fancyNav a.homeIcon{
        background:url('home.png') no-repeat center center;
        display: block;
        overflow: hidden;
        padding-left: 12px;
        padding-right: 12px;
        text-indent: -9999px;
        width: 16px;
    }

    #MainFooter{
        background-color: #1a1a1a;
        position: relative;
        z-index: 10;
        padding:20px;
        border-top: 2px solid white;
        width: 1000px;
        text-align: center;
        margin-top: 496px;
        margin-left: auto;
        margin-right: auto;
    }

琼邦图迪奥斯
版权所有Austin Choncek 2013 css3: 身体{ 背景色:#625D5D; 边际:0px; 填充:0px; 字体系列:Comic Sans MS; 字体风格:普通; 字体大小:14px; 颜色:#1cf1cb; } #网站{ 背景色:#fd4c1d; 宽度:1000px; 边框:#1a1a1a实心2px; 边框底部:无; 边界顶部:无; 左边距:自动; 右边距:自动; 边际上限:0px; 填充:10px0; } #标志{ 显示:块; 边际上限:0px; 左边距:自动; 右边距:自动; 填充:0px; 边界:无; 宽度:690px; 高度:60px; } 范奇纳夫先生{ /*影响UL元素*/ 溢出:隐藏; 显示:内联块; } 李范奇那夫先生{ /*指定回退颜色并为主要浏览器定义CSS3渐变:*/ 背景色:#f0; 背景图像:-webkit渐变(线性、左上、左下、自(#fefefe)、颜色停止(0.5,#f0f0)、颜色停止(0.51,#e6e6)); 背景图像:-莫兹线性梯度(#fefefefefe0%,#f0f0 50%,#e6 51%); 背景图像:-o-线性梯度(#FeFeFeFeFe0%,#F0F050%,#E651%); 背景图像:-ms线性梯度(#FeFeFeFeFe0%,#F0F050%,#E6E6 51%); 背景图像:线性梯度(#fefefefe0%,#f0f0 50%,#e6 51%); 右边框:1px实心rgba(9,9,9,0.125); /*添加1px镶嵌高光,打造更加完美的效果:*/ 框阴影:1px-1px 0 rgba(255,255,255,0.6)插入; -moz盒阴影:1px-1px 0 rgba(255,255,255,0.6)插入; -webkit盒阴影:1px-1px 0 rgba(255,255,255,0.6)插图; 位置:相对位置; 浮动:左; 列表样式:无; } 李:之后{ /*这将在每个LI*中创建一个伪元素 内容:‘’; 文本缩进:-9999px; 溢出:隐藏; 位置:绝对位置; 宽度:100%; 身高:100%; 排名:0; 左:0; z指数:1; 不透明度:0; /*梯度*/ 背景图像:-webkit渐变(线性,左上,右上,从(rgba(168168168,0.5)),颜色停止(0.5,rgba(168168168,0)),到(rgba(168168168,0.5)); 背景图像:-莫兹线性梯度(左,rgba(168168168,0.5),rgba(168168168,0)50%,rgba(168168168,0.5)); 背景图像:-o-线性梯度(左,rgba(168168168,0.5),rgba(168168168,0)50%,rgba(168168168,0.5)); 背景图像:-ms线性梯度(左,rgba(168168168,0.5),rgba(168168168,0)50%,rgba(168168168,0.5)); 背景图像:线性梯度(左,rgba(168168168,0.5),rgba(168168168,0)50%,rgba(168168168,0.5)); /*使用框阴影创建边框。非常有用,因为它们不会影响元素的大小*/ 盒影:-1px0 0#a3a3a3,-2px0#fff,1px0#a3a3a3,2px0#fff; -莫兹盒阴影:-1px00a3a3a3,-2px00fff,1px00a3a3a3,2px00fff; -网络工具包盒阴影:-1px0 0#a3a3a3,-2px0#fff,1px0#a3a3a3,2px0#fff; /*这将为“不透明度”属性创建平滑过渡*/ -moz转换:0.25s全部; -webkit转换:0.25s全部; -o-过渡:0.25s全部; 过渡:0.25s全部; } /*分别对待第一个LI和LI:after元素*/ 李范奇那夫:第一个孩子{ 边界半径:4px 0 0 4px; } 李:第一个孩子:之后, .fancyNav li.入选:第一个孩子:之后{ 盒影:1px0#a3a3a3,2px0#fff; -莫兹盒阴影:1px0#a3a3a3,2px0#fff; -网络工具包盒阴影:1px0 0#a3a3a3,2px0#fff; 边界半径:4px 0 0 4px; } 李:最后一个孩子{ 边界半径:0 4px 4px 0; } /*分别处理最后一个LI和LI:after元素*/ 最后一个孩子:在, .fancyNav li.所选:最后一个孩子:之后{ 盒影:-1px0#a3a3a3,-2px0#fff; -莫兹盒阴影:-1px0#a3a3a3,-2px0#fff; -网络工具包盒阴影:-1px0 0#a3a3a3,-2px0#fff; 边界半径:0 4px 4px 0; } 李:悬停:之后, .fancyNav li.入选:在, 李:目标:之后{ /*此属性触发CSS3转换*/ 不透明度:1; } .fancyNav:hover li.所选:之后, .fancyNav:悬停李:目标:之后{ /*在UL上悬停时隐藏目标li*/ 不透明度:0; } .fancyNav li.所选:悬停:之后, .fancyNav li:目标:悬停:之后{ 不透明度:1!重要; } /*设置锚元素的样式*/ 范奇那夫先生{ 颜色:#5d5d5d; 显示:内联块; 字体:20px/1龙虾,Arial,无衬线; 填充:12px 35px 14px; 位置:相对位置; 文本阴影:1px 1px 0 rgba(255,255,255,0.6); z指数:
<ul class="fancyNav">
        <li id="home"><a href="ChonBonStudios-Home.html" class="homeIcon" >Home</a></li>
        <li id="about"><a href="ChonBonStudios-About.html">About</a></li>
        <li id="android"><a href="ChonBonStudios-Android.html">Android Products</a></li>
        <li id="apple"><a href="ChonBonStudios-Apple.html">Apple Products</a></li>
        <li id="computer"><a href="ChonBonStudios-Computer.html">Computer Services</a></li>
        <li id="youtube"><a href="ChonBonStudios-Youtube.html">Youtube</a></li>
        <li id="contact"><a href="ChonBonStudios-Contact.html">Contact Us</a></li>
        </ul>