解决打印csdn文章显示不全的问题
在需要打印的页面中按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 })();