WordPress Blog Add micro-letter/Pay Treasure Play rewards function

Source: Internet
Author: User
Tags wordpress blog
Chiang in the Netizen blog around the time often see the content of the page there is a reward function, before always want to add to the top, but always feel if you add to a little bit to ask for something like. A few days ago, netizens in the group to discuss this issue, mentioned that it is necessary to add a, in case of sharing the technology, articles, methods can help users and some netizens will send a reward and so on.

Today, work free time, from the WP University (wpdaxue.com) site to see that the effect of good and no plug-ins, and then sorted out to add to the old Chiang tribe, we can now see the effect is still good. can add micro-letter, Alipay payment of the two-dimensional code.

This function is to use no plug-ins, direct CSS implementation, incidentally to share the code, if there are users need to use can be used directly. Here to affirm is that I also from the Wpdaxue, copyright advocates Meng Students, is just a good thing to share to provide convenient. We can install to any site.

First, the CSS section

The code is as follows Copy Code

. reward{padding:5px 0}.reward. reward-notice{font-size:14px;line-height:14px;margin:15px Auto;text-align:center}. Reward. reward-button{font-size:28px;line-height:58px;position:relative;display:block;width:60px;height:60px; margin:0 auto;padding:0;-webkit-user-select:none;text-align:center;vertical-align:middle;color: #fff; border:1px Solid #f1b60e; Border-radius:50%;background: #fccd60; background:-webkit-gradient (linear,left Top,left Bottom, Color-stop (0, #fccd60), Color-stop (100%, #fbae12), Color-stop (100%, #2989d8), Color-stop (100%, #207cca)); Webkit-linear-gradient (Top, #fccd60 0, #fbae12 100%, #2989d8 100%, #207cca 100%); Background:linear-gradient (to bottom,# Fccd60 0, #fbae12 100%, #2989d8 100%, #207cca 100%)}.reward. reward-code{position:absolute;top:-220px;left:50%;d Isplay : none;width:350px;height:200px;margin-left:-175px;padding:15px;border:1px solid #e6e6e6; background: #fff; box-shadow:0 1px 1px 1px #efefef}.reward reward-button:hover reward-code{display:block}.reward reward-code span{Display:inline-block;width:150px;height:150px}.reward. Reward-code Span.alipay-code{float:left}.reward. Reward-code span.alipay-code a{padding:0}.reward reward-code span.wechat-code{float:right}.reward reward-code. img{ display:inline-block;float:left;width:150px;height:150px;margin:0 Auto;border:0}.reward. Reward-code b{font-size : 14px;line-height:26px;display:block;margin:0;text-align:center;color: #666}.reward. Reward-code b.notice{ Line-height:2rem;margin-top:-1rem;color: #999}.reward. Reward-code:after,.reward. Reward-code:before{position: Absolute;content: '; border:10px solid transparent}.reward. reward-code:after{bottom:-19px;left:50%;margin-left:- 10px;border-top-color: #fff}.reward reward-code:before{bottom:-20px;left:50%;margin-left:-10px;border-top-color. : #e6e6e6}

Put CSS in our CSS file, notice if there is a conflict with our existing CSS commands, if there is a need to modify.

2. Call part

The code is as follows Copy Code

<div class= "reward" ><div class= "Reward-button" > Rewards <span class= "Reward-code" > <span class= " Alipay-code "> <b> pay treasure Sweep code rewards </b> </span> <span class= "Wechat-code" > <b> micro-Credit Rewards </b> </span> </span></div><p class= "Reward-notice" > if the article is helpful to you, please move to the top button to play the old Chiang </p></div >

According to our needs, will need to call the reward function of the page, the template to add the above calling code.

PS: The need to mention is that we have to do 2 pictures, from Alipay, micro-mail first download to the collection of two-dimensional code, and then replace it with their own pictures, do not let me.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.