我有两个类,left 和 right,它们 float 和清除左右的东西(真正疯狂的东西)。
但是问题来了。
.dashWrap h3 {
background-color: #666;
border: 2px solid #000;
/*border-radius: 0.5em 0.5em 0 0;*/
text-indent: 0.5em;
}
.dashWrap .dashContent {
/* max-height: 5em;*/
min-height:5em;
overflow-x: hidden;
overflow-y: auto;
border: 2px solid #000;
border-top-color: transparent;
}
.right //If I delete or comment this out, left no longer is applied to anything.
{
clear:right;
float:right;
width:35%;
}
.left
{
float:left;
clear:left;
}
.right //If I delete or comment out this, right no longer is applied to anything.
{
clear:right;
float:right;
width:35%;
}
这正是我正在编辑的文件中的部分。当我加载网站时,实际源文件的唯一区别是在 .dashContent 结束 curl 之后,有这样的:
​
这可能是什么原因造成的?
最佳答案
您的文件中有一些不可见或损坏的字符,因此 .dashContent 之后的第一条规则将被破坏并被浏览器忽略。
尝试删除规则之间的所有内容以去除不可见字符,如果失败,您可以尝试将规则复制到新文件中。如果一切都失败了,您可能需要重新键入文件的一部分。
关于除非重复规则集,否则 CSS 将无法工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11083359/