首页 web前端 css教程 纯CSS3时尚价格表设计效果

纯CSS3时尚价格表设计效果

Jan 18, 2017 pm 01:19 PM

简要教程

这是一款使用纯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时尚价格表设计效果的内容,更多相关内容请关注PHP中文网(www.php.cn)!


本站声明
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn

热AI工具

Undresser.AI Undress

Undresser.AI Undress

人工智能驱动的应用程序,用于创建逼真的裸体照片

AI Clothes Remover

AI Clothes Remover

用于从照片中去除衣服的在线人工智能工具。

Undress AI Tool

Undress AI Tool

免费脱衣服图片

Clothoff.io

Clothoff.io

AI脱衣机

AI Hentai Generator

AI Hentai Generator

免费生成ai无尽的。

热门文章

R.E.P.O.能量晶体解释及其做什么(黄色晶体)
4 周前 By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O.最佳图形设置
4 周前 By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O.如果您听不到任何人,如何修复音频
1 个月前 By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O.聊天命令以及如何使用它们
1 个月前 By 尊渡假赌尊渡假赌尊渡假赌

热工具

记事本++7.3.1

记事本++7.3.1

好用且免费的代码编辑器

SublimeText3汉化版

SublimeText3汉化版

中文版,非常好用

禅工作室 13.0.1

禅工作室 13.0.1

功能强大的PHP集成开发环境

Dreamweaver CS6

Dreamweaver CS6

视觉化网页开发工具

SublimeText3 Mac版

SublimeText3 Mac版

神级代码编辑软件(SublimeText3)

纯CSS3怎么实现波浪效果?(代码示例) 纯CSS3怎么实现波浪效果?(代码示例) Jun 28, 2022 pm 01:39 PM

纯CSS3怎么实现波浪效果?本篇文章就来给大家介绍一下使用 SVG 和 CSS 动画制作波浪效果的方法,希望对大家有所帮助!

巧用CSS实现各种奇形怪状按钮(附代码) 巧用CSS实现各种奇形怪状按钮(附代码) Jul 19, 2022 am 11:28 AM

本篇文章带大家看看怎么使用 CSS 轻松实现高频出现的各类奇形怪状按钮,希望对大家有所帮助!

css怎么隐藏元素但不占空间 css怎么隐藏元素但不占空间 Jun 01, 2022 pm 07:15 PM

两种方法:1、利用display属性,只需给元素添加“display:none;”样式即可。2、利用position和top属性设置元素绝对定位来隐藏元素,只需给元素添加“position:absolute;top:-9999px;”样式。

抖音1-75级价格表 抖音1-75级价格表 Apr 23, 2024 am 11:14 AM

1、1级要花0.5元。2、2级要花1元。3、3级要花2元。4、4级要花3元。5、5级要花5元。6、6级要花7元。7、7级要花9元。8、8级要花13元。9、9级要花18元。10、10级要花24元。11、11级要花32元。12、12级要花42元。13、13级要花57元。14、14级要花73元。15、15级要花97元。16、16级要花130元。17、17级要花170元。

css3怎么实现花边边框 css3怎么实现花边边框 Sep 16, 2022 pm 07:11 PM

在css中,可以利用border-image属性来实现花边边框。border-image属性可以使用图片来创建边框,即给边框加上背景图片,只需要将背景图片指定为花边样式即可;语法“border-image: url(图片路径) 向内偏移值 图像边界宽度 outset 是否重复;”。

原来利用纯CSS也能实现文字轮播与图片轮播! 原来利用纯CSS也能实现文字轮播与图片轮播! Jun 10, 2022 pm 01:00 PM

怎么制作文字轮播与图片轮播?大家第一想到的是不是利用js,其实利用纯CSS也能实现文字轮播与图片轮播,下面来看看实现方法,希望对大家有所帮助!

抖音等级1-60价格表 抖音等级1-60价格表 Apr 29, 2024 am 11:25 AM

1、升到1级需要花0.5元。2、升到2级需要花1元。3、升到3级需要花2元。4、升到4级需要花3元。5、升到5级需要花5元。6、升到6级需要花7元。7、升到7级需要花9元。8、升到8级需要花13元。9、升到9级需要花18元。10、升到10级需要花24元。11、升到11级需要花32元。12、升到12级需要花42元。13、升到13级需要花57元。14、升到14级需要花73元。

css3如何实现鼠标点击图片放大 css3如何实现鼠标点击图片放大 Apr 25, 2022 pm 04:52 PM

实现方法:1、使用“:active”选择器选中鼠标点击图片的状态;2、使用transform属性和scale()函数实现图片放大效果,语法“img:active {transform: scale(x轴放大倍数,y轴放大倍数);}”。

See all articles