通用打赏代码

<!--打赏-->
<style type="text/css">
 .reward {
    font-size: 16px;
    text-align: center;
}
  #rewardButton {
    border: 1px solid#f77b83;
    background-color: #fff;
    line-height: 36px;
    text-align: center;
    cursor: pointer;
    height: 36px;
    display: block;
    border-radius: 4px;
    transition-duration: .4s;
    color: #f77b83;
    margin: 0 auto;
    padding: 0 25px;
    outline-style: none;
}
  #QR {
    padding-top: 20px;
}
#QR img {
    width: 180px;
    max-width: 100%;
    display: inline-block;
    margin: .8em 2em 0;
    border: 1px solid #ddd;
    padding: 3px;
    background: #f8f8f8;
}
</style>
<div class="reward">
        <button id="rewardButton" disable="enable" onclick="var qr = document.getElementById('QR'); if (qr.style.display === 'none') {qr.style.display='block';} else {qr.style.display='none'}">
        <span>打赏</span></button>
        <div id="QR" style="display: none;">
        <div id="wechat" style="display: inline-block">
            <a class="fancybox" rel="group">
            <img id="wechat_qr" src="https://www.*****.com/weixinzhifu.png" alt="微信打赏"></a>
            <p>微信打赏</p>
        </div>
        <div id="alipay" style="display: inline-block">
            <a class="fancybox" rel="group">
            <img id="alipay_qr" src="https://www.*****.com/weixinzhifu.png" alt="还是微信打赏"></a>
            <p>还是微信打赏</p>
        </div>
        </div>
</div>
赞 (1) 打赏

评论 0

觉得文章有用就打赏一下吧

微信扫一扫打赏