简体   繁体   中英

Cannot change div text color or background color

This div is not responding to changes to color, background color, and border width. Why? I've never had this problem before.

Here is the HTML:

<head>
    <link rel="stylesheet" type="text/css" href="classic-button-1.css">
    <meta charset="UTF-8">
</head>

<body>

    <div class="classic-button-1">
        Sign In
    </div>

</body>

Here is the CSS:

.classic-button-1 {
background-color: "#eb7a34";
padding: 0.3em 1.2em;
border: 0.1em solid #eb7a34;
border-radius: 0.12em;
box-sizing: border-box;
text-align: center;
text-decoration: none;
transition: all 0.2s;
}

.classic-button-1:hover {
color: "#eb7a34";
background-color: "#eb7a34";
}

Try removing the quotes around the hex value

.classic-button-1 {
    background-color: #eb7a34;
}

.classic-button-1:hover {
    color: #eb7a34;
    background-color: #eb7a34;
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM