本文介绍了CSS锚点标记属性在#nav li a中被完全忽略的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在这里有一个混乱的时间试图想出这一个。我知道我必须在这里俯瞰东西,因为我已经定义锚属性几次,他们一直工作。

I'm having a confusing time here trying to figure this one out. I know I have to be overlooking something here because I've defined anchor properties several times and they have always worked.

这里是一个jsfiddle我正在工作。

Here is a jsfiddle of exactly what I'm working with (I'm actually working with a test nav that I got from this site from another link that I have altered slightly.)

http://jsfiddle.net/LY3Bm/

#nav li a {
    font-size: 32px;
    text-decoration: none;
    color: white;
    display: block;
    height: 87px;
}

我完全被骗了:\我拉出了我的完整网站,这个非常相同的类型语法在它定义属性到一个定位标记里面的一个li和内部的nav和...它工作正常。

I'm stumped completely :\ I pulled out my full website that has this very same type syntax in it for defining properties to an anchor tag inside of a li and inside of a nav and...it works fine. What am I overlooking?

谢谢!

推荐答案

第21行上的#nav li
定义后留下某种非法字符,这是打破CSS。在小提琴中显示为红点

Seems like you left some kind of illegal character after #nav li definition on line 21 which is breaking the CSS. Shows up as a red dot in the fiddle

#nav li {
} *// Some character here

#nav li a {

这篇关于CSS锚点标记属性在#nav li a中被完全忽略的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!