CSDN页面打印不正常的原因可能有很多,以下是一些可能的原因:
页面布局:CSDN页面可能采用了复杂的布局,导致在打印时页面元素无法正确显示。
样式表:页面的CSS样式表可能不支持打印或者不适合打印。
图像格式:页面中的某些图像可能采用了不支持打印的格式。
打印设置:打印机设置或者打印选项可能不正确,例如,页面大小、边距、缩放等等。
浏览器:浏览器可能不支持打印或者不适合打印,或者打印插件可能需要更新。
如果您遇到了CSDN页面打印不正常的问题,可以尝试以下方法:
1.尝试使用其他浏览器打印,例如,Chrome、Firefox等等。
2.调整打印设置和选项
3.或者直接在浏览器中按F12进入开发者工具,在其console的输入框内复制如下代码运行即可
(function(){
$("#side").remove();
$("#comment_title, #comment_list, #comment_bar, #comment_form,.announce, #ad_cen, #ad_bot").remove();
$(".nav_top_2011, #header, #navigator").remove();
$(".csdn-side-toolbar,.template-box,.reward-user-box").remove();
$(".p4course_target, .comment-box, .recommend-box, #csdn-toolbar,#tool-box,#dmp_ad_58").remove();
$("aside").remove();
$(".tool-box").remove();
$("main").css('display','content');
$("main").css('float','left');
$("#mainBox").css('width','1048px');
$("#mainBox").css('margin-left','0px');
$("#mainBox").css('margin-right','0px');
//$("[class='main_father clearfix d-flexjustify-content-center']").css("width","1048px");
$(".main_father.clearfix.d-flex.justify-content-center").css("width","1048px");
window.print();
$("tool-box").remove();
})();