zoukankan      html  css  js  c++  java
  • linear-gradient 纯CSS3项目价格表切换代码

    <!DOCTYPE html>
    <html lang="en" >
    <head>
    <meta charset="UTF-8">
    <title>纯CSS3项目价格表切换代码 - 站长素材</title>
    
    <style>
    	@import url(https://fonts.googleapis.com/css?family=Open+Sans:700,300);
    * {
      padding: 0;
      margin: 0;
      box-sizing: border-box;
    }
    
    .frame {
      position: absolute;
      top: 50%;
      left: 50%;
       400px;
      height: 400px;
      margin-top: -200px;
      margin-left: -200px;
      border-radius: 2px;
      box-shadow: 4px 8px 16px 0 rgba(0, 0, 0, 0.1);
      overflow: hidden;
      background: #12c2e9;
      background: linear-gradient(45deg, #f64f59, #c471ed, #12c2e9);
      color: #333;
      font-family: 'Open Sans', Helvetica, sans-serif;
      -webkit-font-smoothing: antialiased;
      -moz-osx-font-smoothing: grayscale;
    }
    
    .center {
      position: absolute;
      top: 50%;
      left: 50%;
      -webkit-transform: translate(-50%, -50%);
              transform: translate(-50%, -50%);
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
    }
    
    p {
      text-align: center;
      color: #666;
      font-size: 0.7rem;
      margin-bottom: 10px;
    }
    p.title {
      font-size: 0.8rem;
      font-weight: 700;
      background: #12c2e9;
      color: #f0f0f0;
      padding: 10px 0;
    }
    p .cost {
      display: block;
      font-weight: 700;
      font-size: 2rem;
    }
    
    hr {
      color: #eee;
      border: 0;
      height: 0;
      border-top: 3px solid rgba(0, 0, 0, 0.1);
      border-bottom: 4px solid rgba(255, 255, 255, 0.3);
       60%;
      margin: 2px auto;
    }
    hr:nth-of-type(2n+2) {
       50%;
    }
    
    .pack {
       110px;
      box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.3);
      background: #fff;
      height: 160px;
      display: flex;
      flex-direction: column;
      transition: all 0.5s ease;
    }
    .pack:hover {
      -webkit-transform: scale(1.1);
              transform: scale(1.1);
    }
    .pack:hover .title {
      background: #c471ed;
    }
    .pack.pro {
      margin: 0 10px;
    }
    .pack.pro:hover ~ .stats .users .progress .value {
       50%;
    }
    .pack.pro:hover ~ .stats .space .progress .value {
       66%;
    }
    .pack.pro:hover ~ .stats .projects .progress .value {
       42%;
    }
    .pack.basic:hover ~ .stats .users .progress .value {
       2%;
    }
    .pack.basic:hover ~ .stats .space .progress .value {
       5%;
    }
    .pack.basic:hover ~ .stats .projects .progress .value {
       7%;
    }
    .pack.premium:hover ~ .stats .users .progress .value {
       100%;
    }
    .pack.premium:hover ~ .stats .space .progress .value {
       100%;
    }
    .pack.premium:hover ~ .stats .projects .progress .value {
       100%;
    }
    
    .stats {
       350px;
      height: 160px;
      background: rgba(255, 255, 255, 0.4);
      font-size: 0.7rem;
      color: #333;
      margin-top: 20px;
      padding: 10px;
    }
    .stats > div {
      display: flex;
      flex-direction: column;
    }
    .stats > div .labels {
      display: flex;
      justify-content: space-between;
    }
    .stats > div .progress {
       100%;
      height: 10px;
      background: #ddd;
      margin-top: 5px;
      border-radius: 5px;
    }
    .stats > div .progress .value {
      background: linear-gradient(to right, #00d2ff, #3a7bd5);
      height: 100%;
      border-radius: 5px;
       0;
      transition: all 0.7s ease;
    }
    .stats .space {
      margin: 20px 0;
    }
    
    </style>
    
    </head>
    <body>
    
    <div class="frame">
      <div class="center">
    				<div class="pack basic">
    				<p class="title">Basic</p>
    				<p><span class="cost">$5</span> per month</p>
    				<div class="hr">
    				<hr><hr><hr><hr>	
    				</div>
    			</div>
    			<div class="pack pro">
    				<p class="title">Pro</p>
    				<p><span class="cost">$10</span> per month</p>
    				<div class="hr"><hr><hr><hr><hr></div>
    			</div>
    			<div class="pack premium">
    				<p class="title">Premium</p>
    				<p><span class="cost">$20</span> per month</p>
    				<div class="hr"><hr><hr><hr><hr></div>
    			</div>
    		<div class="stats">
    			<div class="users">
    				<div class="labels">
    					<span class="min">5 Users</span>
    					<span class="max">100 Users</span>	
    				</div>
    				<div class="progress">
    					<div class="value"></div>
    				</div>
    			</div>
    			<div class="space">
    				<div class="labels">
    					<span class="min">20GB</span>
    					<span class="max">200GB</span>
    				</div>
    				<div class="progress">
    					<div class="value"></div>
    				</div>
    
    			</div>
    			<div class="projects">
    				<div class="labels">
    					<span class="min">1 Project</span>
    				<span class="max">50 Projects</span>
    				</div>
    				<div class="progress">
    					<div class="value"></div>
    				</div>
    			</div>
    		</div>
      </div>
    </div>
    
    </body>
    </html>
    

      

  • 相关阅读:
    Typora的使用-规整笔记 让我以后的笔记内容更加整齐
    2019.11.8
    Java笔记1: 输入输出与变量常量
    2019.11.5 规整博客;整理分类;分章节发表博客
    2019.11.4 准备房子/研究汉诺塔问题和递归改变自我思维
    2013年小结
    legoblock秀上限
    阶段总结合计划
    《人月神话》读后感
    《JavaScript语言精髓与编程实践》读书笔记二
  • 原文地址:https://www.cnblogs.com/hellman/p/10094983.html
Copyright © 2011-2022 走看看