我刚刚通过W3C运行了我的站点,它发出了总共3146个警告。
其中大多数是重新定义警告,如下所示:
.fa.fa-check Redefinition of color
.fa.fa-check Redefinition of color
.fa.fa-check Redefinition of font-size
.fa.fa-check Redefinition of font-size
.fa.fa-check Redefinition of background-color
.fa.fa-check Redefinition of background-color
.fa.fa-check Redefinition of display
.fa.fa-check Redefinition of display
.fa.fa-check Redefinition of height
.fa.fa-check Redefinition of height
.fa.fa-check Redefinition of line-height
.fa.fa-check Redefinition of line-height
.fa.fa-check Redefinition of width
.fa.fa-check Redefinition of width
.fa.fa-check Redefinition of text-align
.fa.fa-check Redefinition of text-align这是一个脚本:
.fa.fa-check
{
color: #81D742;
font-size: 3em;
background-color: #F7F7F7;
border: 2px solid #DCDCDC;
border-radius: 110px;
display: inline-block;
height: 110px;
line-height: 110px;
width: 110px;
text-align:center;
padding: 0px;
}我不知道该怎么改变这些警告才能消失。
据我所读,当样式表中有一个重复的定义时,通常会出现重定义警告,但唯一的问题是找不到任何重复的定义。
有人有什么窍门或窍门来解决这个问题吗?
发布于 2016-05-06 17:49:09
您的网站中有几个.fa.fa检查实例。css验证器考虑您尝试重新定义类。
试着只让yout.fa.fa检查类的一个实例,它将解决这个问题--一个是这个类。
https://stackoverflow.com/questions/37078468
复制相似问题