แนะนำ icon CSS น่ารัก ๆ
โพสต์แล้ว: 01/02/2017 6:57 pm
ในหัวข้อนี้จะมาแนะนำ icon น่ารัก ๆ ของ CSS โดยประกาศ Link การเรียกใช้ไว้ในระหว่าง <head></head> ดังนี้
หลังจากนั้นประกาศเรียกใช้ใน <body></body>
Output
และเรายังสามารถนำมาประยกต์ใช้เพิ่มขนาด สี หรือทำเป็นปุ่มกด(<button class="?">)ก็ได้
Ex.1
Output_Ex1
โค้ด: เลือกทั้งหมด
<head>
<title>Font Awesome Icons</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<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>
Ex.1
โค้ด: เลือกทั้งหมด
<i class="fa fa-heart" style="font-size:100px; color: red;"></i>
<i class="fa fa-heart" style="font-size:150px; color: yellow;"></i>
<i class="fa fa-heart" style="font-size:200px; color: green;"></i>