Foundation 標籤


.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">
  <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>Example <span class="label">New</span></h2>
  <h3>Example <span class="label">New</span></h3>
  <h4>Example <span class="label">New</span></h4>
</div>

</body>
</html>

##執行實例»點擊"運行實例" 按鈕查看線上實例

##以下類別可以設定標籤的顏色:
.secondary

, .success, .info, .warning.alert:

#實例

<!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">
  <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>
  <span class="label">Default Label</span>
  <span class="label secondary">Secondary Label</span>
  <span class="label success">Success Label</span>
  <span class="label info">Info Label</span>
  <span class="label warning">Success Label</span>
  <span class="label alert">Alert Label</span>
</div>

</body>
</html>



運行實例»

點擊"運行實例" 按鈕查看線上實例


#圓角標籤

.radius

.round
類別可以為標籤新增圓角:

實例

#
<!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">
  <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>
  <span class="label">Default Label</span>
  <span class="label radius">Radius Label</span>
  <span class="label round">Round Label</span>
  <span class="label success round">5</span>
</div>

</body>
</html>

執行實例»

點選"執行實例" 按鈕查看線上實例

標籤大小
####可以使用CSS 來修改標籤的大小:#########實例## ####
<!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">
  <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;">
  <h1>Example <span class="label" style="font-size:36px;">New</span></h1>
  <h2>Example <span class="label" style="font-size:30px;">New</span></h2>
  <h3>Example <span class="label" style="font-size:20px;">New</span></h3>
  <h4>Example <span class="label">New</span></h4>
</div>

</body>
</html>
#########運行實例»######點擊"運行實例" 按鈕查看線上實例#######