[Reserved] realize blog picture park can zoom function

 

Reprinted from: https://www.cnblogs.com/yulongcode/p/10583129.html

1, go  zoom.js the github  download the required js and css files

2, will be downloaded zoom.js and zoom.css upload files to your own blog Park

3, in the blog page to enter the park management settings (if not opened js use rights, please subscribe)

Page custom CSS code to add custom code:

Copy the code
1 / * overflow hidden set * /
2 #topics, #mainContent {
3     overflow: visible;
4 }
5 #postDesc {
6     float: none;
7 }
Copy the code

Footer Html code to add custom code (note the replacement address zoom.js and zoom.css):

Copy the code
<-! Zoom.js style ->
<link rel="stylesheet" type="text/css" href="https://blog-static.cnblogs.com/files/anwug/zoom.css">
<-! JQuery of cdn ->
<script src="https://cdn.bootcss.com/jquery/1.8.3/jquery.min.js"></script>
<-! Bootstrap's transition.js cdn (transition animation plugins) ->
<script src="https://cdn.bootcss.com/bootstrap/3.2.0/js/transition.js"></script>
<-! Zoom.js core code ->
<script src="https://blog-static.cnblogs.com/files/anwug/zoom.js"></script>
<script type='text/javascript'>$('#cnblogs_post_body img').attr('data-action', 'zoom');</script>
Copy the code
 
 
 
 

Guess you like

Origin www.cnblogs.com/phyger/p/11372660.html