재단 아이콘
Foundation은 283개의 아이콘을 제공하며 CSS를 사용하여 스타일 크기를 정의할 수 있습니다.
아이콘은 텍스트, 버튼, 도구 모음, 탐색 모음, 양식 등에 사용할 수 있습니다.
아이콘 구문
아이콘 생성 구문은 다음과 같습니다.
<i class="fi-name"></i>
name 부분은 아이콘 이름으로 대체됩니다.
아이콘을 사용하려면 <head> 섹션에 아이콘의 스타일 파일을 추가해야 합니다:
<link rel="stylesheet" href="../style/css/foundation-icons.css" >
아이콘 예
다음은 아이콘 사용 예를 보여줍니다.
Instance
<!DOCTYPE html> <html> <head> <title>Foundation 实例</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="http://static.php.cn/assets/foundation-5.5.3/foundation.min.css"> <link rel="stylesheet" href="http://static.php.cn/assets/foundation-icons/foundation-icons.css"> <script src="http://static.php.cn/assets/jquery/2.0.3/jquery.min.js"></script> <script src="http://static.php.cn/assets/foundation-5.5.3/js/foundation.min.js"></script> <script src="http://static.php.cn/assets/foundation-5.5.3/js/vendor/modernizr.js"></script> </head> <body> <div style="padding:20px;"> <h2>图标实例</h2> <p>Cloud icon: <i class="fi-cloud"></i></p> <p>Cloud icon as a link: <a href="#"><i class="fi-cloud"></i></a> </p> <p>Styled Cloud icon: <i class="fi-cloud" style="font-size:35px;color:red;"></i></p> <p>Home icon: <i class="fi-home"></i></p> <p>Home icon on a button: <button type="button" class="button"> <i class="fi-home"></i> Home </button> </p> <p>Home icon on a green button: <button type="button" class="button success"> <i class="fi-home"></i> Home </button> </p> <p>Home icon on a large, light blue link button: <a href="#" class="button info large"> <i class="fi-home"></i> Home </a> </p> </div> </body> </html>
Run Instance»
온라인 예를 보려면 "인스턴스 실행" 버튼을 클릭하세요
Toolbar Icon
.icon-bar
클래스를 사용하여 지정된 수의 도구 모음 아이콘을 만들 수 있습니다: .icon-bar
类来创建一个指定数量的工具栏图标:
实例
<!DOCTYPE html> <html> <head> <title>Foundation 实例</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="http://static.php.cn/assets/foundation-5.5.3/foundation.min.css"> <link rel="stylesheet" href="http://static.php.cn/assets/foundation-icons/foundation-icons.css"> <script src="http://static.php.cn/assets/jquery/2.0.3/jquery.min.js"></script> <script src="http://static.php.cn/assets/foundation-5.5.3/js/foundation.min.js"></script> <script src="http://static.php.cn/assets/foundation-5.5.3/js/vendor/modernizr.js"></script> </head> <body> <h2>Icon Bar</h2> <div class="icon-bar five-up"> <a href="#" class="item"> <i class="fi-home"></i> </a> <a href="#" class="item"> <i class="fi-share"></i> </a> <a href="#" class="item"> <i class="fi-info"></i> </a> <a href="#" class="item"> <i class="fi-mail"></i> </a> <a href="#" class="item"> <i class="fi-magnifying-glass"></i> </a> </div> </body> </html>
运行实例 »
点击 "运行实例" 按钮查看在线实例
图标描述使用 <label>
元素:
实例
<!DOCTYPE html> <html> <head> <title>Foundation 实例</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="http://static.php.cn/assets/foundation-5.5.3/foundation.min.css"> <link rel="stylesheet" href="http://static.php.cn/assets/foundation-icons/foundation-icons.css"> <script src="http://static.php.cn/assets/jquery/2.0.3/jquery.min.js"></script> <script src="http://static.php.cn/assets/foundation-5.5.3/js/foundation.min.js"></script> <script src="http://static.php.cn/assets/foundation-5.5.3/js/vendor/modernizr.js"></script> </head> <body> <h2>图标工具栏</h2> <div class="icon-bar five-up"> <a href="#" class="item"> <i class="fi-home"></i> <label>Home</label> </a> <a href="#" class="item"> <i class="fi-share"></i> <label>Share</label> </a> <a href="#" class="item"> <i class="fi-info"></i> <label>Info</label> </a> <a href="#" class="item"> <i class="fi-mail"></i> <label>Mail</label> </a> <a href="#" class="item"> <i class="fi-magnifying-glass"></i> <label>Search</label> </a> </div> </body> </html>
运行实例 »
点击 "运行实例" 按钮查看在线实例
.disabled
类可以让图标变成不可点击状态:
实例
<!DOCTYPE html> <html> <head> <title>Foundation 实例</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="http://cdn.static.runoob.com/libs/foundation/5.5.3/css/foundation.min.css"> <link rel="stylesheet" href="http://static.runoob.com/assets/foundation-icons/foundation-icons.css"> <script src="http://cdn.static.runoob.com/libs/jquery/2.1.1/jquery.min.js"></script> <script src="http://cdn.static.runoob.com/libs/foundation/5.5.3/js/foundation.min.js"></script> <script src="http://cdn.static.runoob.com/libs/foundation/5.5.3/js/vendor/modernizr.js"></script> </head> <body> <h2>图标工具栏</h2> <div class="icon-bar five-up"> <a href="#" class="item"> <i class="fi-home"></i> </a> <a href="#" class="item disabled"> <i class="fi-share"></i> </a> <a href="#" class="item"> <i class="fi-info"></i> </a> <a href="#" class="item disabled"> <i class="fi-mail"></i> </a> <a href="#" class="item"> <i class="fi-magnifying-glass"></i> </a> </div> </body> </html>
运行实例 »
点击 "运行实例" 按钮查看在线实例
.vertical
Instances
Run Instance»"Run Instance"를 클릭합니다. 온라인 인스턴스를 보려면 버튼
icon <!DOCTYPE html> <html> <head> <title>Foundation 实例</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="http://static.php.cn/assets/foundation-5.5.3/foundation.min.css"> <link rel="stylesheet" href="http://static.php.cn/assets/foundation-icons/foundation-icons.css"> <script src="http://static.php.cn/assets/jquery/2.0.3/jquery.min.js"></script> <script src="http://static.php.cn/assets/foundation-5.5.3/js/foundation.min.js"></script> <script src="http://static.php.cn/assets/foundation-5.5.3/js/vendor/modernizr.js"></script> </head> <body> <h2>图标工具栏</h2> <div class="icon-bar vertical five-up"> <a href="#" class="item"> <i class="fi-home"></i> </a> <a href="#" class="item"> <i class="fi-share"></i> </a> <a href="#" class="item"> <i class="fi-info"></i> </a> <a href="#" class="item"> <i class="fi-mail"></i> </a> <a href="#" class="item"> <i class="fi-magnifying-glass"></i> </a> </div> </body> </html>
Run Instance»"Run Instance"를 클릭합니다. 온라인 인스턴스를 보려면 버튼
<label>
요소를 사용한 설명: Instancerrreee🎜🎜🎜Run Instance»🎜🎜보려면 "인스턴스 실행" 버튼을 클릭하세요. 온라인 인스턴스🎜🎜🎜
.disabled
클래스는 아이콘을 클릭할 수 없게 만들 수 있습니다: 🎜🎜🎜Instance🎜🎜rrreee🎜🎜🎜Run Instance»🎜🎜온라인 인스턴스를 보려면 "인스턴스 실행" 버튼을 클릭하세요🎜 🎜🎜.vertical
클래스가 사용됩니다. 수직 도구 모음 만들기: 🎜🎜🎜Instance🎜🎜rrreee🎜🎜🎜Run Instance»🎜🎜온라인 예제를 보려면 "인스턴스 실행" 버튼을 클릭하세요🎜🎜🎜🎜 재단 아이콘 참조 매뉴얼🎜🎜아이콘에 대한 자세한 내용은 재단 아이콘 안내서를 참조하세요. 🎜