CSS 아이콘

아이콘 추가 방법

HTML 페이지에 아이콘을 추가하는 가장 간단한 방법은 아이콘 라이브러리를 사용하는 것입니다. 예를 들어, Font Awesome.

지정된 아이콘 클래스 이름을 어떤 행 내 HTML 요소(예: <i> 또는 <span>)에 추가합니다.

아래 아이콘 라이브러리에 있는 모든 아이콘은 확장 가능한 벡터이며, CSS를 사용하여 사용자 정의할 수 있습니다. (크기, 색상, 그림자 등).

Font Awesome 아이콘

Font Awesome 아이콘을 사용하려면, fontawesome.com에 방문하여 로그인하고 코드를 얻어 HTML 페이지의 <head> 부분에 추가하세요:

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

Font Awesome 5 튜토리얼에서 Font Awesome를 시작하는 방법에 대한 더 많은 내용을 읽어보세요.

알림:다운로드나 설치할 필요가 없습니다!

예제

<!DOCTYPE html>
<html>
<head>
<script src="https://kit.fontawesome.com/a076d05399.js"></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>

결과:

본인이 직접 시도해보세요

Bootstrap 아이콘

Bootstrap glyphicons를 사용하려면, HTML 페이지의 <head> 부분에 다음 행을 추가하세요:

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

알림:다운로드나 설치할 필요가 없습니다!

예제

<!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 아이콘

Google 아이콘을 사용하려면, HTML 페이지의 <head> 부분에 다음 행을 추가하세요:

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

알림:다운로드나 설치할 필요가 없습니다!

예제

<!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>

결과:

본인이 직접 시도해보세요