simon-xie

在需要打印的页面中按F12,切换到console,将如下代码黏贴到命令行回车即可

 1 (function(){undefined
 2 $("#side").remove();
 3 $("#comment_title, #comment_list, #comment_bar, #comment_form, .announce, #ad_cen, #ad_bot").remove();
 4 $(".nav_top_2011, #header, #navigator").remove();
 5 $(".csdn-side-toolbar,.template-box,.reward-user-box").remove();
 6 $(".p4course_target, .comment-box, .recommend-box, #csdn-toolbar, #tool-box,#dmp_ad_58").remove();
 7 $("aside").remove();
 8 $(".tool-box").remove();
 9 $("main").css(\'display\',\'content\'); 
10 $("main").css(\'float\',\'left\'); 
11 $("#mainBox").css(\'width\',\'1048px\');
12 $("#mainBox").css(\'margin-left\',\'0px\');
13 $("#mainBox").css(\'margin-right\',\'0px\');
14 //$("[class=\'main_father clearfix d-flex justify-content-center\']").css("width","1048px");
15 $(".main_father.clearfix.d-flex.justify-content-center").css("width","1048px");
16 window.print();
17 $("tool-box").remove();
18 })();

 

分类:

技术点:

相关文章:

  • 2021-07-12
  • 2021-12-31
  • 2021-12-15
  • 2021-11-03
  • 2021-10-08
  • 2021-04-07
  • 2021-09-08
  • 2021-12-31
猜你喜欢
  • 2021-09-28
  • 2021-12-31
  • 2021-11-27
  • 2021-11-27
  • 2021-09-28
  • 2021-12-31
  • 2021-09-28
相关资源
相似解决方案