Ich habe einen einfachen Login (über Google Mail) Knopf mit grüner Farbe erstellt. Schauen sie bitteButton mit einem Symbol CSS
<!DOCTYPE html>
<html>
<head>
<style>
.button {
background-color: #4CAF50;
border: none;
color: white;
padding: 15px 32px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
margin: 4px 2px;
cursor: pointer;
}
.button:icon {
background: url(gmail-icon.png) no-repeat;
float: left;
width: 10px;
height: 40px;
}
</style>
</head>
<body>
<button class="button"><span class="icon"></span>Button</button>
</body>
Aber ich kann mein Symbol auf der Schaltfläche nicht sehen. Bitte sagen Sie mir warum?
Ihr Selektor sollte '.button.icon' sein – UncaughtTypeError