CSS-Symbole


Inhaltsverzeichnis

    Inhaltsverzeichnis anzeigen


Mithilfe einer Symbolbibliothek können Sie ganz einfach Symbole zu Ihrer HTML-Seite hinzufügen.



So fügen Sie Symbole hinzu

Der einfachste Weg, ein Symbol zu Ihrer HTML-Seite hinzuzufügen, ist mit einer Symbolbibliothek. wie Font Awesome.

Fügen Sie den Namen der angegebenen Symbolklasse zu einem beliebigen Inline-HTML-Element hinzu (wie <i> oder <span>).

Alle Symbole in den Symbolbibliotheken unten sind skalierbare Vektoren, die dies können mit CSS anpassbar (Größe, Farbe, Schatten usw.)


Fantastische Schriftarten-Symbole

Um die Font Awesome-Symbole zu verwenden, gehen Sie zu Fontawesome.com, melden Sie sich an und erhalten Sie einen Code, den Sie im Abschnitt <head> Ihrer HTML-Seite hinzufügen können:

<script; src="https://kit.fontawesome.com/yourcode.js" crossorigin="anonymous"></script>

Lesen Sie mehr über die ersten Schritte mit Font Awesome in unserem Schriftart Tolles 5-Tutorial.

Hinweis: Es ist kein Download oder Installation erforderlich!

Beispiel

<!DOCTYPE html>
<html>
<head>
  <script src="https://kit.fontawesome.com/a076d05399.js" crossorigin="anonymous"></script>
</head>
<body>
<i class="fas fa-cloud"></i>
<i  class="fas fa-heart"></i>
<i class="fas fa-car"></i>
<i class="fas fa-file"></i>
<i class="fas fa-bars"></i>

</body>
</html>

Ergebnis :

Probieren Sie es selbst aus →

<!DOCTYPE html>
<html>
<head>
<title>Font Awesome Icons</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="https://kit.fontawesome.com/a076d05399.js" crossorigin="anonymous"></script>
<!--Get your own code at fontawesome.com-->
</head>
<body>

<h1>Font Awesome icon library</h1>

<p>Some Font Awesome icons:</p>
<i class="fas fa-cloud"></i>
<i class="fas fa-heart"></i>
<i class="fas fa-car"></i>
<i class="fas fa-file"></i>
<i class="fas fa-bars"></i>

<p>Styled Font Awesome icons (size and color):</p>
<i class="fas fa-cloud" style="font-size:24px;"></i>
<i class="fas fa-cloud" style="font-size:36px;"></i>
<i class="fas fa-cloud" style="font-size:48px;color:red;"></i>
<i class="fas fa-cloud" style="font-size:60px;color:lightblue;"></i>

</body>
</html>


Eine vollständige Referenz aller Font Awesome-Symbole finden Sie in unserer Symbolreferenz.



Bootstrap-Symbole

Um die Bootstrap-Glyphicons zu verwenden, fügen Sie die folgende Zeile in den Abschnitt <head> Ihrer HTML-Seite ein:

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">

Hinweis: Es ist kein Download oder Installation erforderlich!

Beispiel

 <!DOCTYPE html>
<html>
<head>
     <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
</head>
<body>
  
<i class="glyphicon glyphicon-cloud"></i>
<i class="glyphicon  glyphicon-remove"></i>
<i class="glyphicon glyphicon-user"></i>
<i  class="glyphicon glyphicon-envelope"></i>
<i class="glyphicon glyphicon-thumbs-up"></i>

  </body>
</html>

Ergebnis :

Probieren Sie es selbst aus →

<!DOCTYPE html>
<html>
<head>
<title>Bootstrap Icons</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
</head>
<body class="container">

<h1>Bootstrap icon library</h1>

<p>Some Bootstrap icons:</p>
<i class="glyphicon glyphicon-cloud"></i>
<i class="glyphicon glyphicon-remove"></i>
<i class="glyphicon glyphicon-user"></i>
<i class="glyphicon glyphicon-envelope"></i>
<i class="glyphicon glyphicon-thumbs-up"></i>
<br><br>

<p>Styled Bootstrap icons (size and color):</p>
<i class="glyphicon glyphicon-cloud" style="font-size:24px;"></i>
<i class="glyphicon glyphicon-cloud" style="font-size:36px;"></i>
<i class="glyphicon glyphicon-cloud" style="font-size:48px;color:red;"></i>
<i class="glyphicon glyphicon-cloud" style="font-size:60px;color:lightblue;"></i>

</body>
</html>



Google-Symbole

Um die Google-Symbole zu verwenden, fügen Sie die folgende Zeile in den Abschnitt <head> Ihrer HTML-Seite ein:

Hinweis: Es ist kein Download oder Installation erforderlich!

Beispiel

<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
</head>
<body>

<i class="material-icons">cloud</i>
<i  class="material-icons">favorite</i>
<i  class="material-icons">attachment</i>
<i  class="material-icons">computer</i>
<i  class="material-icons">traffic</i>
</body>
</html>

Ergebnis :

Probieren Sie es selbst aus →

<!DOCTYPE html>
<html>
<head>
<title>Google Icons</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
</head>
<body>

<h1>Google icon library</h1>

<p>Some Google icons:</p>
<i class="material-icons">cloud</i>
<i class="material-icons">favorite</i>
<i class="material-icons">attachment</i>
<i class="material-icons">computer</i>
<i class="material-icons">traffic</i>
<br><br>

<p>Styled Google icons (size and color):</p>
<i class="material-icons" style="font-size:24px;">cloud</i>
<i class="material-icons" style="font-size:36px;">cloud</i>
<i class="material-icons" style="font-size:48px;color:red;">cloud</i>
<i class="material-icons" style="font-size:60px;color:lightblue;">cloud</i>

</body>
</html>


Eine vollständige Liste aller Symbole finden Sie auf unserer Icon-Tutorial.