前端开发

css – 语法错误:意外令牌“”

2021-01-18 17:33:55 阅读数 8658 收藏 0
body
{
    margin: 0px;
}
.wrapper
{
    width: 960px;
    margin: 0 auto;
}
#header
{
    background-image: url('../images/cream-gravel-texture.png');
    height: 626px;
    overflow: auto;
}
#midHeader
{
    margin-top: 20px;
    background-image: url('../images/light-grey-bit-behind-logo.png');
    height: 194px;
}
#logo
{
    padding-top: 10px;
    float: left;
    clear: left;
    width: 287px;
}
#headContact
{
    margin-top: 60px;
    font-size: 21.95px;
    color: #4b1e19;
    font-family: Arial,"Helvetica Neue",Helvetica,sans-serif;
    text-align: right;
    float: right;
    clear: right;
    width: 421px;
}
#contactUsNow
{
    float: left;
    clear: left;
}
#navMenu ul 
{
    list-style:none;
    margin: 5px;
    padding: 0px;
}
#navMenu ul li 
{
    display:inline;
}
#navMenu ul li a 
{
    display: block;
    text-decoration:none;
    float:left;
    text-align:center;
    margin: 5px 43px 10px 0;
    font-size: 20.4px;
    padding: 5px 10px 4px 10px;
    color: #4b1e19;
    font-family: Arial,sans-serif;
    /*height: 33px;
    line-height: 33px;*/
    -moz-border-radius: 5px;
    -webkit-border-radius: 5px;
    -khtml-border-radius: 5px;
    border-radius: 5px;
}

#navMenu ul li a:hover,#navMenu ul li.active a 
{
    /*line-height: 33px;*/
    background-image: url('../images/nav-hover.png');
    /*height: 33px;*/
}​
#headShadow
{
    background-image: url('../images/gradient-under-beige-bit.png');
    height: 22px;
}

这个CSS给了我标题中的错误.怎么了?

解决方法

在#headShadow之前有一个隐藏的,不可打印的字符,它表示我将CSS复制到文本编辑器中.在前一个指令中关闭}}以退出它.
#navMenu ul li a:hover,#navMenu ul li.active a 
{
    /*line-height: 33px;*/
    background-image: url('../images/nav-hover.png');
    /*height: 33px;*/
}​<200b>
#headShadow