多语言展示
当前在线:870今日阅读:168今日分享:49

HTML5+CSS3价格表翻转切换动画

HTML5+CSS3价格表翻转切换动画
工具/原料

adobe dreamweaver

方法/步骤
1

新建html文档。

2

书写hmtl代码。

 
 

               

 
 
     
  •    
         
    •      
           

      Basic

           
      $ 30 mo
           
           
           
               
      • 5 Email Accounts
      •        
      • 1 Template Style
      •        
      • 25 Products Loaded
      •        
      • 1 Image per Product
      •        
      • Unlimited Bandwidth
      •        
      • 24/7 Support
      •      
           
                

3

书写css代码。.pricing-container { width: 90%; max-width: 1170px; margin: 4em auto; }.pricing-container { margin: 6em auto; }.pricing-container.full-width { width: 100%; max-width: none; }.pricing-switcher { text-align: center; }.pricing-switcher .fieldset { display: inline-block; position: relative; padding: 2px; border-radius: 50em; border: 2px solid #2d3e50; }.pricing-switcher input[type='radio'] { position: absolute; opacity: 0; }.pricing-switcher label { position: relative; z-index: 1; display: inline-block; float: left; width: 90px; height: 40px; line-height: 40px; cursor: pointer; font-size: 1.4rem; color: #ffffff; }.pricing-switcher .switch { position: absolute; top: 2px; left: 2px; height: 40px; width: 90px; background-color: #2d3e50; border-radius: 50em; -webkit-transition: -webkit-transform 0.5s; -moz-transition: -moz-transform 0.5s; transition: transform 0.5s; }.pricing-switcher input[type='radio']:checked + label + .switch, .pricing-switcher input[type='radio']:checked + label:nth-of-type(n) + .switch { -webkit-transform: translateX(90px); -moz-transform: translateX(90px); -ms-transform: translateX(90px); -o-transform: translateX(90px); transform: translateX(90px); }.no-js .pricing-switcher { display: none; }.pricing-list { margin: 2em 0 0; }.pricing-list > li { position: relative; margin-bottom: 1em; } @media only screen and (min-width: 768px) {.pricing-list { margin: 3em 0 0; }.pricing-list:after { content: ''; display: table; clear: both; }.pricing-list > li { width: 33.3333333333%; float: left; padding-left: 5px; padding-right: 5px; }.has-margins .pricing-list > li { width: 32.3333333333%; float: left; margin-right: 1.5%; }.has-margins .pricing-list > li:last-of-type { margin-right: 0; }}

4

书写并添加js代码。 

5

代码整体结构。

6

查看效果。

推荐信息