您好,欢迎访问一九零五行业门户网

纯CSS3时尚价格表设计效果

简要教程
这是一款使用纯css3制作的时尚价格表。该价格表通过bootstrap来进行布局,采用扁平风格,鼠标划过时还带有平滑过渡的颜色变化效果。
使用方法
html结构
该价格表的基本html结构如下:
<div class="container"> <div class="row"> <div class="col-md-3 col-sm-6"> <div class="pricingtable"> <div class="pricingtable-header"> <h3 class="heading">standard</h3> <span class="price-value"> <span class="currency">$</span> 10 <span class="month">/mo</span> </span> </div> <div class="pricing-content"> <ul> <li>50gb disk space</li> <li>50 email accounts</li> <li>50gb monthly bandwidth</li> <li>10 subdomains</li> <li>15 domains</li> </ul> <a href="#" class="read">sign up</a> </div> </div> </div> <div class="col-md-3 col-sm-6"> <div class="pricingtable"> <div class="pricingtable-header"> <h3 class="heading">business</h3> <span class="price-value"> <span class="currency">$</span> 20 <span class="month">/mo</span> </span> </div> <div class="pricing-content"> <ul> <li>60gb disk space</li> <li>60 email accounts</li> <li>60gb monthly bandwidth</li> <li>15 subdomains</li> <li>20 domains</li> </ul> <a href="#" class="read">sign up</a> </div> </div> </div> </div> </div>
css样式
完成该价格表的所有css代码如下:
.pricingtable{ text-align: center; } .pricingtable .pricingtable-header{ padding: 30px 0; background: #4d4d4d; position: relative; transition: all 0.3s ease 0s; } .pricingtable:hover .pricingtable-header{ background: #09b2c6; } .pricingtable .pricingtable-header:before, .pricingtable .pricingtable-header:after{ content: ""; width: 16px; height: 16px; border-radius: 50%; border: 1px solid #d9d9d8; position: absolute; bottom: 12px; } .pricingtable .pricingtable-header:before{ left: 40px; } .pricingtable .pricingtable-header:after{ right: 40px; } .pricingtable .heading{ font-size: 20px; color: #fff; text-transform: uppercase; letter-spacing: 2px; margin-top: 0; } .pricingtable .price-value{ display: inline-block; position: relative; font-size: 55px; font-weight: bold; color: #09b1c5; transition: all 0.3s ease 0s; } .pricingtable:hover .price-value{ color: #fff; } .pricingtable .currency{ font-size: 30px; font-weight: bold; position: absolute; top: 6px; left: -19px; } .pricingtable .month{ font-size: 16px; color: #fff; position: absolute; bottom: 15px; right: -30px; text-transform: uppercase; } .pricingtable .pricing-content{ padding-top: 50px; background: #fff; position: relative; } .pricingtable .pricing-content:before, .pricingtable .pricing-content:after{ content: ""; width: 16px; height: 16px; border-radius: 50%; border: 1px solid #7c7c7c; position: absolute; top: 12px; } .pricingtable .pricing-content:before{ left: 40px; } .pricingtable .pricing-content:after{ right: 40px; } .pricingtable .pricing-content ul{ padding: 0 20px; margin: 0; list-style: none; } .pricingtable .pricing-content ul:before, .pricingtable .pricing-content ul:after{ content: ""; width: 8px; height: 46px; border-radius: 3px; background: linear-gradient(to bottom,#818282 50%,#727373 50%); position: absolute; top: -22px; z-index: 1; box-shadow: 0 0 5px #707070; transition: all 0.3s ease 0s; } .pricingtable:hover .pricing-content ul:before, .pricingtable:hover .pricing-content ul:after{ background: linear-gradient(to bottom, #40c4db 50%, #34bacc 50%); } .pricingtable .pricing-content ul:before{ left: 44px; } .pricingtable .pricing-content ul:after{ right: 44px; } .pricingtable .pricing-content ul li{ font-size: 15px; font-weight: bold; color: #777473; padding: 10px 0; border-bottom: 1px solid #d9d9d8; } .pricingtable .pricing-content ul li:last-child{ border-bottom: none; } .pricingtable .read{ display: inline-block; font-size: 16px; color: #fff; text-transform: uppercase; background: #d9d9d8; padding: 8px 25px; margin: 30px 0; transition: all 0.3s ease 0s; } .pricingtable .read:hover{ text-decoration: none; } .pricingtable:hover .read{ background: #09b1c5; } @media screen and (max-width: 990px){ .pricingtable{ margin-bottom: 25px; } }
以上就是纯css3时尚价格表设计效果的内容。
其它类似信息

推荐信息