有创意的结帐CSS开源脚本:Fancy-Checkout
Fancy-Checkout是一套非常酷炫有创意的结帐开源CSS动画脚本,遵守MIT开源协议。( 信用卡类型则默认visa卡),支付成功会显示信用卡插入的动画。
代码样例:
<!-- css assets -->
<link href="https://fonts.googleapis.com/css?family=Nunito:300,400,900" rel="stylesheet">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link rel="stylesheet" href="dist/css/fancy-checkout.css">
<!-- js assets -->
<script src="dist/js/fancy-checkout.js"></script>
<script>
const buyButton = document.getElementById('btn-comprar');
buyButton.addEventListener('click', function () {
buyButton.innerHTML = 'Processando...';
// fake api request
window.setTimeout(function () {
// success return
FancyCheckout.init();
}, 2000);
});
</script>
演示网站:https://www.cssscript.com/demo/fancy-animated-checkout-experience/
[repo owner=”gabriellamas” name=”Fancy-Checkout”]
发表回复