"Blog beautification" reviews the lead image, and supports rotation
Long time no update about the blog Garden page beautification of the article, the main is to write about the commentary on the lead, and support the rotation of the content, I hope you can enjoy the small partners!!!
1.
2. Add CSS Code
Settings-page Custom CSS code
.feedbackCon img:hover {-webkit-transform: rotateZ(360deg);-moz-transform: rotateZ(360deg);-ms-transform: rotateZ(360deg);-o-transform: rotateZ(360deg);transform: rotateZ(360deg);} .feedbackCon img {border-radius: 40px;-webkit-transition: all 0.6s ease-out;-moz-transition: all 0.5s ease-out;-ms-transition: all 0.5s ease-out;-o-transition: all 0.5s ease-out;transition: all 0.5s ease-out;}
3. Uploading JavaScript files
File Address: Https://blog-static.cnblogs.com/files/jackson0714/Comments.js
The following is a reference to the farm code of a lifetime JavaScript script.
* * comments.js**
function Customtimer (Inpid, FN) {if ($ (inpid). Length) {fn ();} else {var intervalid = setinterval (function () {if ($ (inpid). Length) {//If there is clearinterval (intervalid); Then turn off the timer customtimer (Inpid, FN); Execute itself}, 100);}} Add a comment area image function AddImage () {var spen_html = "<span class= ' bot ' ></span> <span class= ' top ' ></sp An> "; $ (". Blog_comment_body "). Append (spen_html); $ (". Blog_comment_body "). Before (" <div class= ' body_right ' Style= ' Float:left; ' ><a target= ' _blank ' ></a></div> "); var Feedbackcon = $ (". Feedbackcon "). AddClass (" Clearfix "); for (var i = 0; i < feedbackcon.length; i++) {var span = $ (feedbackcon[i]). Find (" Span:last ") [0].innerhtml | | "Http://pic.cnitblog.com/face/sample_face.gif"; $ (feedbackcon[i]). Find (". Body_right img"). attr ("src", span); var href = $ (feedbackcon[i]). Parent (). Find (". Comment_date"). Next (). attr ("href"); $ (feedbackcon[i]). Find (". Body_right A "). attr (" href ", href);}} Page load completion is performed $ (function () {//Add comment area image by customTimer (". Blog_comment_body", AddImage);});
4. Introduction of JavaScript files
5: Footer HTML code
Introduce the second step to upload the JavaScript file comments.js:
<script type="text/javascript" src="http://files.cnblogs.com/files/自己的博客名称/Comments.js"></script>
For example: mine is:
Summary: Overall is relatively simple, I hope to help you small partners!!
"Blog beautification" reviews the lead image, and supports rotation