css支付页面表单效果代码
代码语言:html
所属分类:表单美化
代码描述:css支付页面表单效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> * { -webkit-box-sizing: inherit; box-sizing: inherit; } html { -webkit-box-sizing: border-box; box-sizing: border-box; } body { background-color: #fae3ea; display: grid; font-family: Poppins, sans-serif; line-height: 1.5; margin: 0; min-height: 100vh; padding: 5vmin; -webkit-box-align: center; -ms-flex-align: center; align-items: center; justify-items: center; place-items: center; } address { font-style: normal; } button { border: 0; color: inherit; cursor: pointer; font: inherit; } fieldset { border: 0; margin: 0; padding: 0; } h1 { font-size: 1.25rem; line-height: 1.2; margin-bottom: 1.5em; margin-top: 0; } h2 { font-size: 1rem; line-height: 1.2; margin-bottom: 0.5em; margin-top: 0; } legend { font-weight: 600; margin-bottom: 0.5em; padding: 0; } input { border: 0; color: inherit; font: inherit; } table { border-collapse: collapse; width: 100%; } tbody { color: #b4b4b4 } td { padding-bottom: 0.125em; padding-top: 0.125em; } tfoot { border-top: 1px solid #b4b4b4; font-weight: 600; } .align { display: grid; -webkit-box-align: center; -ms-flex-align: center; align-items: center; justify-items: center; place-items: center; } .button { -webkit-box-align: center; -ms-flex-align: center; align-items: center; background-color: #fc8080; border-radius: 999em; color: #fff; display: -webkit-box; display: -ms-flexbox; display: flex; grid-gap: 0.5em; gap: 0.5em; -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; padding: 0.75em 1em; -webkit-transition: 0.3s; -o-transition: 0.3s; transition: 0.3s; } .button:focus, .button:hover { background-color: #e96363; } .button--full { width: 100%; } .card { border-radius: 1em; background-color: #fc8080; color: #fff; padding: 1em; } .form { display: grid; grid-gap: 2em; gap: 2em; } .form__radios { display: grid; grid-gap: 1em; gap: 1em; } .form__radio { -webkit-box-align: center; -ms-flex-align: center; align-items: center; background-color: #fefdfe; border-radius: 1em; -webkit-box-shadow: 0 0 1em rgba(0, 0, 0, 0.0625); box-shadow: 0 0 1em rgba(0, 0, 0, 0.0625); display: -webkit-box; display: -ms-flexbox; display: flex; padding: 1em; } .form__radio label { -webkit-box-align: center; -ms-flex-align: center; align-items: center; display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-flex: 1; -ms-flex: 1; flex: 1; grid-gap: 1em; gap: 1em; } .header { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; padding: 0.5em 1em; } .icon { display: inline-block; fill: currentColor; height: 1em; vertical-align: middle; width: 1em; } .iphone { background-color: #fbf6f7; background-image: -webkit-gradient(linear, left top, left bottom, from(#fbf6f7), to(#fff)); background-image: -o-linear-gradient(top, #fbf6f7, #fff); background-image: linear-gradient(to bottom, #fbf6f7, #fff); border-radius: 2em; -webkit-box-shadow: 0 0 1em rgba(0, 0, 0, 0.0625); box-shadow: 0 0 1em rgba(0, 0, 0, 0.0625); height: 812px; overflow: auto; padding: 2em; width: 375px; } </style> </head> <body > <div class="iphone"> <header class="header"> <h1>Checkout</h1> </header> <form action="https://httpbin.org/post" class="form" method="POST"> <div> <h2>Address</h2> <div class="card"> <address> Adam Johnson<br /> 403 Oakland Ave Street, A city, Florida, 32104,<br /> United States of America </address> </div> </div> <fieldset> <legend>Payment Method</legend> <div class="form__radios"> <div class="form__radio"> <label for="visa"><svg class="icon"> <use xlink:href="#icon-visa" /> </svg>Visa Payment</label> <input checked id="visa" name="payment-method" type="radio" /> </div> <div class="form__radio"> <label for="paypal"><svg class="icon"> <use xlink:href="#icon-paypal" /> </svg>PayPal</label> <input id="paypal" name="payment-method" type="radio" /> </div> <div class="form__radio"> <label for="mastercard"><svg class="icon"> <use xlink:href="#icon-mastercard" /> </svg>Master Card</label> <input id="mastercard" name="payment-method" type="radio" /> </div> </div> </fieldset> <div> <h2>Shopping Bill</h2> <table> <tbody> <tr> <td>Shipping fee</td> <td align="right">$5.43</td> </tr> <tr> <td>Discount 10%</td> <td align="right">-$1.89</td> </tr> <tr> <td>Price Total</td> <td align="right">$84.82</td> </tr> </tbody> <tfoot> <tr> <td>Total</td> <td align="right">$88.36</td> </tr> </tfoot> </table> </div> <div> <button class="button button--full" type="submit"><svg class="icon"> <use xlink:href="#icon-shopping-bag" /> &l.........完整代码请登录后点击上方下载按钮下载查看
网友评论0