Foundation 價格表
價格表可用來展示企業產品:
實例
<!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> <ul class="pricing-table"> <li class="title">Basic</li> <li class="price">.99</li> <li class="description">Great for small business</li> <li class="bullet-item">24/7 Support</li> <li class="bullet-item">15GB Storage</li> <li class="bullet-item">1GB Bandwidth</li> <li class="cta-button"><a class="a button" href="#">Sign Up</a></li> </ul> </div> </body> </html>
執行實例»
點擊"執行實例" 按鈕檢視線上實例
實例解析
#ul.pricing-table
- 定義價格表li.title
- 定義產品標題(黑色背景)#li.price
- 定義價格(灰色背景字體大個子項)li.description
- 定義產品描述(如果需要)li. bullet-item
- 定義產品特點li.ca-button
- 按鈕文字(如"Buy", "Join", "Sign Up" , 等等)
注意: 表格會100% 填滿容器的寬度,所有的項目都有邊框且是居中的。
價格表網格
以下實例顯示了三個企業產品的價格(三項是均等劃分寬度的):
實例
<!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 class="row"> <h2>网格中的价格表</h2> <div class="medium-4 columns"> <ul class="pricing-table"> <li class="title">Basic</li> <li class="price">.99</li> <li class="description">Great for small business</li> <li class="bullet-item">24/7 Support</li> <li class="bullet-item">15GB Storage</li> <li class="bullet-item">1GB Bandwidth</li> <li class="cta-button"><a class="a button" href="#">Sign Up</a></li> </ul> </div> <div class="medium-4 columns"> <ul class="pricing-table"> <li class="title">Pro</li> <li class="price">.99</li> <li class="description">For the Average Joe</li> <li class="bullet-item">24/7 Support</li> <li class="bullet-item">25GB Storage</li> <li class="bullet-item">2GB Bandwidth</li> <li class="cta-button"><a class="a button" href="#">Sign Up</a></li> </ul> </div> <div class="medium-4 columns"> <ul class="pricing-table"> <li class="title">Premium</li> <li class="price">.99</li> <li class="description">When only the best is an option</li> <li class="bullet-item">24/7 Support</li> <li class="bullet-item">Unlimited Storage</li> <li class="bullet-item">Unlimited Bandwidth</li> <li class="cta-button"><a class="a button" href="#">Sign Up</a></li> </ul> </div> </div> </body> </html>
執行實例»
點擊"運行實例" 按鈕查看線上實例