无法弄清楚将大括号放在哪里以及其他错误?

发布于 2025-01-11 16:57:25 字数 897 浏览 5 评论 0原文

我正在尝试从该网站添加一个简单的向下滚动图标动画, https://codepen.io/TKS31/pen/gOaKaxx 到我的项目,但我收到错误。

10 problems
} expected css(css-rcurlyexpected) x1
{ expected css(css-rcurlyexpected) x8
at-rule or selector expected css(css-ruleorselectorexpected)

CSS:

  .scroll {
    width: 60px;
    height: 60px;
    border: 2px solid #333;
    border-radius: 50%;
    position: relative;
    animation: down 1.5s infinite;
    -webkit-animation: down 1.5s infinite;
    &::before {
      content: '';
      position: absolute;
      top: 15px;
      left: 18px;
      width: 18px;
      height: 18px;
      border-left: 2px solid red;
      border-bottom: 2px solid red;
      transform: rotate(-45deg);
    }
  }

问题来自这里的某个地方,因为一旦我删除这部分,问题就消失了。对于这一切还是新鲜事。它可以在网站上运行,但不能在我的项目上运行。

I'm trying to add a simple scroll-down icon animation from this website,
https://codepen.io/TKS31/pen/gOaKaxx
to my project but I'm getting an error.

10 problems
} expected css(css-rcurlyexpected) x1
{ expected css(css-rcurlyexpected) x8
at-rule or selector expected css(css-ruleorselectorexpected)

CSS:

  .scroll {
    width: 60px;
    height: 60px;
    border: 2px solid #333;
    border-radius: 50%;
    position: relative;
    animation: down 1.5s infinite;
    -webkit-animation: down 1.5s infinite;
    &::before {
      content: '';
      position: absolute;
      top: 15px;
      left: 18px;
      width: 18px;
      height: 18px;
      border-left: 2px solid red;
      border-bottom: 2px solid red;
      transform: rotate(-45deg);
    }
  }

The problem is coming from somewhere here because as soon as I delete this part, the problem goes away. Still new to all of this. It works on the website but not on my project.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文