input[type="submit"]> CSS backround color > invalid property name

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

为按钮设置样式,我得到

background-color: red;
(和任何其他颜色)的“无效属性名称”。

input[type="submit"] {
     {
        background-color: red;
        color: var(--primary-ultra-light);
        cursor: pointer;
        border-style: solid;
        border-color: var(--primary);
        padding: 0.75em 1.5em;
        border-width: 0.25rem;
        border-radius: 0;
        text-transform: none;
        -webkit-text-decoration: none !important;
        text-decoration: none;
        letter-spacing: 0;
        font-weight: 400;
        font-style: normal;
        min-width: 20rem;
        line-height: 1;
        font-size: 1.8rem;
        font-size: calc(1.4rem + (0.2 * ((100vw - 32rem) / 78)));
        font-size: clamp(
            1.4rem,
            calc(0.2564102564vw + 1.3179487179rem),
            1.6rem
        );
    }
}

Screenshot

我试过了

  • background: red
  • border-color: var(--primary);

我的主色是红色

input types submit
© www.soinside.com 2019 - 2024. All rights reserved.