一天一个小页面(4)

卡片展示效果

今天复习了CSS的内容,就写点CSS的吧!
1、效果图

在这里插入图片描述

2、思路
综合用css的知识、、、

animation啊、弹性布局啊、ul的排列啊、文字的变换啊

3、代码
<div class="pricing-table">
      <div class="col">

          <div class="table">
            <h2>Regular</h2>
            <div class="price">
              $10
              <span>Per Month</span>
            </div>
            <ul>
              <li><strong>2 </strong>Website</li>
              <li><strong>10 </strong>Emails</li>
              <li><strong>100GB </strong>Storage</li>
              <li><strong>1 </strong>Account</li>
            </ul>
            <a href="#">Buy Now</a>
          </div>

      </div>

      <div class="col">

        <div class="table">
          <h2>Regular</h2>

          <div class="price">
            $10
            <span>Per Month</span>
          </div>
          <ul>
            <li><strong>2 </strong>Website</li>
            <li><strong>10 </strong>Emails</li>
            <li><strong>100GB </strong>Storage</li>
            <li><strong>1 </strong>Account</li>
          </ul>
          <a href="#">Buy Now</a>
        </div>

      </div>

      <div class="col">

        <div class="table">
          <h2>Regular</h2>
          <div class="price">
            $10
            <span>Per Month</span>
          </div>
          <ul>
            <li><strong>2 </strong>Website</li>
            <li><strong>10 </strong>Emails</li>
            <li><strong>100 GB </strong>Storage</li>
            <li><strong>1 </strong>Account</li>
          </ul>
          <a href="#">Buy Now</a>
        </div>

      </div>

      <div class="col">

        <div class="table">
          <h2>Regular</h2>
          <div class="price">
            $10
            <span>Per Month</span>
          </div>
          <ul>
            <li><strong>2 </strong>Website</li>
            <li><strong>10 </strong>Emails</li>
            <li><strong>100 GB </strong>Storage</li>
            <li><strong>1 </strong>Account</li>
          </ul>
          <a href="#">Buy Now</a>
        </div>

      </div>

    </div>
body{
  margin: 0;
  padding: 0;
  background-image: url("../img/6.jpg");
  background-size: cover;
  background-attachment: fixed;
}

.pricing-table{
  max-width: 1200px;
  margin: auto;
  display: flex;
  text-align: center;
  flex-wrap: wrap;
}

.col{
  flex: 25%;
  padding: 10px;
  max-width: 320px;
  box-sizing: border-box;
}

.table{
  background: #fff;
  padding: 40px 20px;
  font-family: "montserrat",sans-serif;
  overflow: hidden;
  box-shadow: 0 0 10px #00000070;
}
.table h2{
  text-transform: uppercase;
}
.table ul{
  margin: 0;
  padding: 0;
}
.table ul li{
  padding: 10px 0;
  list-style: none;
}
.price{
  font-size: 40px;
  margin-bottom: 20px;
}
.price span{
  display: block;
  font-size: 14px;
}
.table a{
  text-decoration: none;
  color: #2c3e50;
  border: 2px solid #2c3e50;
  display: block;
  padding: 10px 0;
  margin: 10px 0;
  border-radius: 40px;
  text-transform: uppercase;
  font-size: 14px;
  transition: 0.5s linear;
}
.table a:hover{
  background-color: #2c3e50 ;
  color: #fff;
}
.pop{
  background: #2c3e50;
  color: #fff;
  transform: rotate(45deg);
  padding: 10px 40px;
  position: absolute;
  top: 20px;
  right: -34px;
}
@media screen and (max-width:980px){
  .col{
    flex:50%;
  }
}
@media screen and (max-width:700px){
  .col{
    flex:100%;
  }
}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值