Wat is CSS-ikone?
Ikone kom in skaalbare vektorbiblioteke wat met CSS aangepas kan word
Algemene biblioteke is:
- Font Awesome ikone
- Bootstrap-ikone
- Google-ikone
Hoe om?
Om ikone te gebruik, voeg net 'n skakel by die ikoonbiblioteek die
<head>
afdeling van jou HTML-bladsy:
Geen aflaaie of installasies nodig nie!
Om 'n ikoon in te voeg, voeg die naam van die ikoonklas by enige inlyn HTML-element soos <i>
of <span>
.
Font Awesome Voorbeeld
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
</head>
<body>
<i class="fa fa-cloud"></i>
<i class="fa
fa-heart"></i>
<i class="fa fa-car"></i>
<i class="fa fa-file"></i>
<i class="fa fa-bars"></i>
</body>
</html>
Vir 'n volledige lys van ikone (Font Awesome, Bootstrap en Google), besoek W3School se Icon Reference .
Bootstrap voorbeeld
<!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>
Google voorbeeld
<!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>
Volledige ikone handleiding
Dit was 'n kort beskrywing van ikone.
Vir 'n volledige Icons-tutoriaal gaan na W3Schools Icons-tutoriaal .
Vir 'n volledige Icons-verwysing gaan na W3Schools Icons Reference .