快速做一个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
}


评论(0条)

刀客源码 游客评论