本文由 发布,转载请注明出处,如有问题请联系我们! 发布时间: 2021-05-08快速做一个js打赏弹窗小功能
加载中放在前端页面喜欢的位置上,点击一下就会弹出的位置
<button type="button" id="ClickMe"> <i class="icon iconfont icon-yulebao"></i> <span>文字</span> </button>
这里是样式美化,也可以自己修改调整
#goodcover { display: none; position: fixed; top: 0%; left: 0%; width: 100%; height: 133%; background-color: #000; z-index: 1001; -moz-opacity: .8; opacity: .7; filter: alpha(opacity=80) } #code { padding: 10px; background-size: cover; background-repeat: no-repeat; background-position: 50% 50%; background-color: #313435; z-index: 1002; border-radius: 8px; display: none; } .close1 { position: relative; } .close1 i{ font-size: 25px; font-weight: 700; color: white; position: absolute; right: -20px; top: -30px; } .goodtxt { margin-left: 30px; } .goodtxt p { font-size: 16px; color: #fff; } .goodtxt .vtip{ font-size: 12px; color: #b3b3b3;} .code-img { width: 250px; padding: 10px } .code-img img { width: 240px }