css - 我是 scss 新手,遇到 scss 代码格式的问题
问题描述
嘿,我是 scss 的新手,我的代码中出现了一些错误。我正在为我的页面使用父类。这是我的CSS
.d-layout {
.bg-img {
height: 304px;
width: 1140px;
}
.p-color: {
color: #A50034;
}
.ptd {
.icon {
height: 8px;
width: 8px;
transform: rotate(-90deg);
}
button {
color: #A50034;
font-family: "LG Smart_Global";
font-size: 20px;
line-height: 28px;
}
}
}
错误是SassError: Invalid CSS after " };": expected "}", was ".p-color: {"
解决方案
我相信您的 sass 代码的问题是“.p-color”之后的冒号
代码应该是:
.p-color {
color: #A50034;
}
推荐阅读
- android - apksigner - 无效的密钥库格式
- javascript - jQuery Math - 没有空字段的计算
- cordova - 没有为模拟器指定目标 (CORDOVA)
- python - 总结文本文件的内容
- sendgrid - 当它们都是 sendgrid 时如何添加 2 个 DKIM 记录。Klaviyo 和 Sendgrid
- node.js - Mongoose - 如何通过 ObjectId 的“数组”查找?
- c# - 将二维数组分成偶数/奇数二维数组的程序问题(偶数/奇数数组中的额外零)
- amazon-web-services - 创建 AWS SNS 主题和 SQS 队列以及为主题订阅队列的推荐方法
- asp.net-mvc - 从外部域查看时,SSRS 报告呈现旧版本
- excel - 使用 SaveAs UI 后如何读取目标路径