伙计们,我在一些第三方来源的复杂CSS选择器上工作。我不能忍受用户的一些事情。
嵌套CSS的工作原理。我看到很多像这样的嵌套CSS。
.firstclass
{
.someotherclass { }
}
有时候。
.firstclass.secondclass
{
.thirdclass{}
.fourthclass{}
}
此外,我还尝试了下面的示例代码,我的预期是第二个文本框的背景颜色将变为“黑色”,但这并没有发生。
<html>
<head>
<style type="text/css">
.style-color
{
background-color:#000000;
}
#id2_.style-color h1
{
background-color:#F0E68C;
.apply
{
background-color:#000000;
}
}
</style>
</head>
<body>
<div id="id1" class="style-color"> <h1> <input type="text" class="apply"> </h1> </div>
<div id="id2_" class="style-color"> <h1> <input type="text" class="apply"> </h1></div>
</body>
</html>
发布于 2013-06-27 06:12:42
这不是有效的CSS。如果你看到的是代码,那么它主要是动态的CSS。SASS和LESS是动态CSS的示例。它们为CSS添加了编程功能。你可以使用SASS的SCOUT编译器。用谷歌搜索一下。
发布于 2013-06-27 06:36:29
我发现我使用的第三方源代码都是在内部使用SAAS。因此,我感到困惑。
现在我已经清楚了这一点,所以我将尝试理解SAAS及其工作方式。
https://stackoverflow.com/questions/17335709
复制相似问题