程序员外包定价表_带有引导程序的响应式定价表

程序员外包定价表

Pricing tables are widely used on many websites. If you haven’t created pricing tables with bootstrap, our tutorial will be useful for you. Simple responsive pricing tables – they look great on all devices. On big screens, we see the entire table, three columns in a row. On small screens, they will be placed from top to down, listing all the features vertically. We will also try to minimize the number of custom styles.

定价表已在许多网站上广泛使用。 如果您尚未使用引导程序创建定价表,那么我们的教程将对您有所帮助。 简单的响应式定价表–它们在所有设备上看起来都很不错。 在大屏幕上,我们看到整个表,一行三列。 在小屏幕上,它们将从上到下放置,并垂直列出所有功能。 我们还将尝试减少自定义样式的数量。

HTML结构 (HTML structure)

To start – create an empty ‘index.html’ file and add the following markup code into it:

首先-创建一个空的'index.html'文件,并在其中添加以下标记代码:


<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Responsive Pricing Table with Bootstrap | Script Tutorials</title>
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
  <link rel="stylesheet" href="css/style.css">
</head>
<body>
  <section id="section-pricing" class="section-pricing">
    <div class="container">
      <div class="pricing-table">
        <div class="row">
          <!-- First package -->
          <div class="col-md-4">
            <div class="package">
              <div class="header-package-1 text-center">
                <h3>Basic</h3>
                <div class="price"><h3>$10</h3></div>
              </div>
              <!-- details -->
              <div class="package-features text-center">
                <ul>
                  <li>Bandwith Unlimited</li>
                  <li>Disk Space Unlimited</li>
                  <li>Unlimited Sub Domain</li>
                  <li>Free Domain</li>
                  <li>Free Support</li>
                </ul>
                <div class="wrp-button text-center"><a href="#" class="btn standard-button">GET IT</a></div>
              </div>
            </div>
          </div>
          <!-- Second package -->
          <div class="col-md-4">
            <div class="package">
              <div class="header-package-2 text-center">
                <div class="recomended"><h4>Recomended</h4></div>
                <h3>Standard</h3>
                <div class="price"><h3>$25</h3></div>
              </div>
              <!-- details -->
              <div class="package-features text-center">
                <ul>
                  <li>Bandwith Unlimited</li>
                  <li>Disk Space Unlimited</li>
                  <li>Unlimited Sub Domain</li>
                  <li>Free Domain</li>
                  <li>Free Support</li>
                  <li>Extra</li>
                </ul>
                <div class="wrp-button text-center"><a href="#" class="btn standard-button">GET IT</a></div>
              </div>
            </div>
          </div>
          <!-- Third package -->
          <div class="col-md-4">
            <div class="package">
              <div class="header-package-3 text-center">
                <h3>Advanced</h3>
                <div class="price">
                <h3>$50</h3>
                </div>
              </div>
              <!-- details -->
              <div class="package-features text-center">
                <ul>
                <li>Bandwith Unlimited</li>
                <li>Disk Space Unlimited</li>
                <li>Unlimited Sub Domain</li>
                <li>Free Domain</li>
                <li>Free Support</li>
                </ul>
                <div class="wrp-button text-center"><a href="#" class="btn standard-button">GET IT</a></div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </section>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
</body>
</html>

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Responsive Pricing Table with Bootstrap | Script Tutorials</title>
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
  <link rel="stylesheet" href="css/style.css">
</head>
<body>
  <section id="section-pricing" class="section-pricing">
    <div class="container">
      <div class="pricing-table">
        <div class="row">
          <!-- First package -->
          <div class="col-md-4">
            <div class="package">
              <div class="header-package-1 text-center">
                <h3>Basic</h3>
                <div class="price"><h3>$10</h3></div>
              </div>
              <!-- details -->
              <div class="package-features text-center">
                <ul>
                  <li>Bandwith Unlimited</li>
                  <li>Disk Space Unlimited</li>
                  <li>Unlimited Sub Domain</li>
                  <li>Free Domain</li>
                  <li>Free Support</li>
                </ul>
                <div class="wrp-button text-center"><a href="#" class="btn standard-button">GET IT</a></div>
              </div>
            </div>
          </div>
          <!-- Second package -->
          <div class="col-md-4">
            <div class="package">
              <div class="header-package-2 text-center">
                <div class="recomended"><h4>Recomended</h4></div>
                <h3>Standard</h3>
                <div class="price"><h3>$25</h3></div>
              </div>
              <!-- details -->
              <div class="package-features text-center">
                <ul>
                  <li>Bandwith Unlimited</li>
                  <li>Disk Space Unlimited</li>
                  <li>Unlimited Sub Domain</li>
                  <li>Free Domain</li>
                  <li>Free Support</li>
                  <li>Extra</li>
                </ul>
                <div class="wrp-button text-center"><a href="#" class="btn standard-button">GET IT</a></div>
              </div>
            </div>
          </div>
          <!-- Third package -->
          <div class="col-md-4">
            <div class="package">
              <div class="header-package-3 text-center">
                <h3>Advanced</h3>
                <div class="price">
                <h3>$50</h3>
                </div>
              </div>
              <!-- details -->
              <div class="package-features text-center">
                <ul>
                <li>Bandwith Unlimited</li>
                <li>Disk Space Unlimited</li>
                <li>Unlimited Sub Domain</li>
                <li>Free Domain</li>
                <li>Free Support</li>
                </ul>
                <div class="wrp-button text-center"><a href="#" class="btn standard-button">GET IT</a></div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </section>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
</body>
</html>

In the head section we included all necessary css files: bootstrap.min.css and style.css with our custom styles. Since rows in bootstrap consist of 12 columns, and we need to display 3 pricing sections, each section will be 4-length column:

在开头部分,我们包含了所有必需的css文件:bootstrap.min.css和style.css,以及我们的自定义样式。 由于引导程序中的行由12列组成,并且我们需要显示3个定价部分,因此每个部分将为4个长度的列:


<div class="col-md-4">
  <div class="package">
    <div class="header-package-1 text-center">
      <h3>title</h3>
      <div class="price"><h3>price</h3></div>
    </div>
    <!-- details -->
    <div class="package-features text-center">
      <ul>
        <li>feature 1</li>
        <li>feature 2</li>
        <li>feature 3</li>
        <li>feature 4</li>
        <li>feature 5</li>
      </ul>
      <div class="wrp-button text-center"><a href="#" class="btn standard-button">GET IT</a></div>
    </div>
  </div>
</div>

<div class="col-md-4">
  <div class="package">
    <div class="header-package-1 text-center">
      <h3>title</h3>
      <div class="price"><h3>price</h3></div>
    </div>
    <!-- details -->
    <div class="package-features text-center">
      <ul>
        <li>feature 1</li>
        <li>feature 2</li>
        <li>feature 3</li>
        <li>feature 4</li>
        <li>feature 5</li>
      </ul>
      <div class="wrp-button text-center"><a href="#" class="btn standard-button">GET IT</a></div>
    </div>
  </div>
</div>

As you see, we prepared all three sections total. Now, we can start stylize the sections.

如您所见,我们总共准备了全部三个部分。 现在,我们可以开始对各节进行样式化。

CSS样式 (CSS styles)

Now, create another file: ‘css/style.css’ for our styles. First, we define the main styles for layout: paddings and margins:

现在,创建另一个文件:'css / style.css'作为我们的样式。 首先,我们定义布局的主要样式:填充和边距:

css/style.css

css / style.css


@import url(http://fonts.googleapis.com/css?family=Roboto);
.section-pricing {
  padding:50px 0;
}
.pricing-table {
  font-family:Roboto, sans-serif;
  margin-top:35px;
}
.package {
  margin:20px 0;
  overflow:auto;
}

@import url(http://fonts.googleapis.com/css?family=Roboto);
.section-pricing {
  padding:50px 0;
}
.pricing-table {
  font-family:Roboto, sans-serif;
  margin-top:35px;
}
.package {
  margin:20px 0;
  overflow:auto;
}

All pricing headers have green background, slightly rounded on top

所有定价标题均具有绿色背景,顶部略有四舍五入


.header-package-1,.header-package-2,.header-package-3 {
  background:green;
  border-radius:4px 4px 0 0;
  color:#fff;
  font-weight:700;
}
.header-package-1 {
  margin-top:30px;
  padding-bottom:15px;
  padding-top:15px;
}
.header-package-2 {
  padding-bottom:30px;
  padding-top:30px;
}
.header-package-3 {
  margin-top:30px;
  padding-bottom:15px;
  padding-top:15px;
}
.header-package-1 h3,.header-package-2 h3,.header-package-3 h3 {
  color:#fff;
  font-weight:800;
}

.header-package-1,.header-package-2,.header-package-3 {
  background:green;
  border-radius:4px 4px 0 0;
  color:#fff;
  font-weight:700;
}
.header-package-1 {
  margin-top:30px;
  padding-bottom:15px;
  padding-top:15px;
}
.header-package-2 {
  padding-bottom:30px;
  padding-top:30px;
}
.header-package-3 {
  margin-top:30px;
  padding-bottom:15px;
  padding-top:15px;
}
.header-package-1 h3,.header-package-2 h3,.header-package-3 h3 {
  color:#fff;
  font-weight:800;
}

Price has a thin white border, with defined width, so it looks like a box. Probably you already noticed rotated ‘recommended’ label. It has dashed white border, and it is rotated by 45 degrees

价格有一个细的白色边框,具有定义的宽度,因此它看起来像一个盒子。 可能您已经注意到旋转的“推荐”标签。 它带有虚线的白色边框,并且旋转了45度


.price {
  border:2px solid #fff;
  color:green;
  margin:0 auto;
  padding-bottom:20px;
  padding-top:15px;
  width:100px;
}
.recomended h4 {
  border:2px dashed #FFF;
  display:inline-block;
  left:15px;
  padding:10px;
  position:absolute;
  transform:rotate(-45deg);
}

.price {
  border:2px solid #fff;
  color:green;
  margin:0 auto;
  padding-bottom:20px;
  padding-top:15px;
  width:100px;
}
.recomended h4 {
  border:2px dashed #FFF;
  display:inline-block;
  left:15px;
  padding:10px;
  position:absolute;
  transform:rotate(-45deg);
}

The list of features has a thin border, as well as every feature in this list has the border (in bottom) of the same gray color

要素列表的边框很细,并且此列表中的每个要素的边框(底部)都具有相同的灰色


.package-features {
  border:1px solid #E3E3E3;
}
.package-features ul {
  padding:0;
}
.package-features ul li {
  border-bottom:2px solid #e3e3e3;
  list-style:none;
  overflow:auto;
  padding:20px 10px;
}

.package-features {
  border:1px solid #E3E3E3;
}
.package-features ul {
  padding:0;
}
.package-features ul li {
  border-bottom:2px solid #e3e3e3;
  list-style:none;
  overflow:auto;
  padding:20px 10px;
}

Last element of pricing tables is button. The button has rounded corners, with white text on green background

定价表的最后一个元素是按钮。 该按钮具有圆角,在绿色背景上带有白色文本


.wrp-button {
  padding:26px 10px 36px;
}
.package-features .standard-button {
  margin:0;
  padding:15px 20px;
}
.standard-button {
  background:green;
  border:0;
  border-radius:4px;
  color:#fff;
  font-family:sans-serif;
  font-size:16px;
  font-weight:700;
  line-height:inherit;
  margin:5px;
  padding:15px 30px;
  text-transform:uppercase;
  -webkit-transition:all ease .25s;
  transition:all ease .25s;
}
.standard-button:hover {
  color:#fff;
  opacity:0.8;
}
.standard-button:focus {
  color:#fff;
}

.wrp-button {
  padding:26px 10px 36px;
}
.package-features .standard-button {
  margin:0;
  padding:15px 20px;
}
.standard-button {
  background:green;
  border:0;
  border-radius:4px;
  color:#fff;
  font-family:sans-serif;
  font-size:16px;
  font-weight:700;
  line-height:inherit;
  margin:5px;
  padding:15px 30px;
  text-transform:uppercase;
  -webkit-transition:all ease .25s;
  transition:all ease .25s;
}
.standard-button:hover {
  color:#fff;
  opacity:0.8;
}
.standard-button:focus {
  color:#fff;
}

That’s it, our pricing table is ready. You can check the result.

就是这样,我们的价格表已准备就绪。 您可以检查结果。

现场演示

[sociallocker]

[社交储物柜]

打包下载

[/sociallocker]

[/ sociallocker]

翻译自: https://www.script-tutorials.com/responsive-pricing-table-with-bootstrap/

程序员外包定价表

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值