我的 html 文档中存在未知单词(CssSyntaxError)

问题描述 投票:0回答:1

enter image description here我对开发还很陌生。我收到此错误,但我不知道出了什么问题。我想我已经安装了该项目所需的所有扩展。我正在使用 vs-code。 我不知道这是否是我的 CSS 文档中的错误。我想我那里没有。

有人可以帮助我吗?

我尝试安装新的扩展,但没有成功。

body {
  background-color: #211F2B;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
}

h1,
h2 {
  margin: 0;
}

h1 {
  color: white;
  font-size: 16px;
  font-weight: 500;
  margin-top: 10px;
}

h2 {
  color: rgba(255, 255, 255, 0.5);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 10px;
}

form {
  margin: 0;
  padding: 0;
  width: 100%;
}

.divider {
  width: 100px;
  height: 3px;
  margin: 20px auto;
  background-color: #617BFF;
}

input,
textarea {
  position: relative;
  text-align: center;
  display: block;
  margin: 0;
  border-radius: 7px;
  border: 2px white solid;
  background-color: white;
  padding: 10px 20px;
  width: 100%;
  color: #1E1C29;
  margin-bottom: 20px;
  box-sizing: border-box;
  transition: all 0.2s;
}

input:focus,
textarea:focus {
  outline: none;
  border: 2px #617BFF solid;
}

.container {
  background-color: rgba(255, 255, 255, 0.1);
  width: 300px;
  margin: 0 auto;
  border-radius: 14px;
  padding: 30px 30px 20px 30px;
  margin-top: 50px;
}

input[name="amount"] {
  font-size: 20px;
  font-weight: 600;
}

input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

#submit-btn {
  display: block;
  text-decoration: none;
  border-radius: 7px;
  margin-bottom: 10px;
  cursor: pointer;
  font-size: 20px;
  font-weight: 600;
  border: 2px #617BFF solid;
  color: white;
  background-color: #617BFF;
  padding: 15px;
  transition: all 0.2s;
}

#submit-btn:hover {
  border: 2px #8095FF solid;
  background-color: #8095FF;
}

#submit-btn:disabled {
  border: 2px rgba(255, 255, 255, 0.1) solid;
  background-color: rgba(255, 255, 255, 0.1);
}

textarea[name="address"] {
  resize: none;
  font-size: 16px;
  font-weight: 600;
  padding: 10px 2.7rem;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
}
<!DOCTYPE html>
<html>

  <head>
    <title>DBank</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <link type="text/css" rel="stylesheet" href="main.css" />
 
  </head>

  <body>
    <div class="container">
      <img src="dbank_logo.png" alt="DBank logo" width="100"/>
      <h1>Current Balance: $<span id="value">234</span></h1>
      <div class="divider"></div>
      <form action="#">
      <h2>Amount to Top Up</h2>
      <input id="input-amount" type="number" step="0.01" min=0 name="topUp" value=""/>
      <h2>Amount to Withdraw</h2>
      <input id="withdrawal-amount" type="number" name="withdraw" step="0.01" min=0 value=""/>
      <input id="submit-btn" type="submit" value="Finalise Transaction" />
    </form>
    </div>
  </body>

</html>

html css ubuntu
1个回答
0
投票

您编写的 HTML 和 CSS 是完美的,没有任何问题,但如果您收到该错误,请忽略它,因为有时会遇到错误或故障,或者可能是您尚未安装 HTML 或 CSS 或实时版本服务器扩展,如果您已经这样做了,那么只需尝试忽略该问题,它不会影响您的输出。

专注于你的项目,祝你无论做什么都好运

如果您对我的回答满意请给我点赞:)

© www.soinside.com 2019 - 2024. All rights reserved.