让<pre></pre>标签太长自动换行

本文深入讲解CSS中的pre样式属性,包括white-space和word-wrap的使用技巧,帮助读者掌握如何控制文本换行和预格式化文本。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

pre{

        white-space:pre-wrap;

        white-space:-moz-pre-wrap;

        white-space:-pre-wrap;

        white-space:-o-pre-wrap;

        word-wrap:break-word;

}

"\n\n\n \n Avis de marché - Avis n° 25-20867 du 21/02/2025\n \n \n \n \n \n \n <div>\n <div>Avis de marché</div>\n </div>\n <div>Département(s) de publication : \n <strong>22</strong>\n \n </div>\n <div>\n Annonce n°\n <strong>25-20867</strong>\n </div>\n <div>Services</div>\n <hr />\n <div>Section 1 - Identification de l'acheteur</div>\n <div>\n <div>\n Nom et adresse officiels de l'organisme acheteur : Services Interhospitaliers du Tregor Goëlo</div>\n <div>\n Correspondant : MME Marie-Laure LE BERRE</div>\n <div>\n Adresse : 2 rue Louis PASTEUR,\n 22220 \n Minihy-Treguier\n </div>\n <div>\n Coordonnées :\n <div>\n <div>\n Courriel :\n Contact@si-tregorgoelo.fr\n </div>\n </div>\n </div>\n </div>\n <div>Section 2 - Description du marché</div>\n <div>\n <div>\n Objet du marché : Prestation de maintenance et assistance relative à l'infrastructure et au parc \ninformatique</div>\n <div>\n Lieu d'exécution et de livraison :2 rue Louis PASTEUR,\n 22220 \n Minihy-treguier\n </div>\n </div>\n <div>Section 8 - Mode de passation du marché</div>\n <div>\n <div>\n Type de procédure : procédure adaptée</div>\n </div>\n <div>Section 10 - Conditions de délai</div>\n <div>\n <div>\n Date limite de réception des offres : 21/03/2025 à 12:00</div>\n </div>\n <div>Section 11 - Autres renseignements</div>\n <div>\n <div>\n Numéro de référence attribué au marché par le pouvoir\n adjudicateur / l'entité adjudicatrice :\n 2025-02</div>\n </div>\n <div>Section 12 - Adresses complémentaires</div>\n <div>\n <div>\n Adresse auprès de laquelle les documents peuvent être\n obtenus :\n \n <div>\n <div>\n Coordonnées : \n <div>\n <div>\n Adresse internet :\n <a>\n https://www.achatpublic.com/sdm/ent/gen/ent_detail.do?PCSLID=CSL_2025_PzUIi1q4Pa\n </a>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <hr />\n <div>\n Date d'envoi du présent avis à la publication : 21/02/2025</div>\n \n\n\n \n \n "将这串字符串使用jsoup去除html标签后,将文本中的多个连续\n替换为单个\n,原本的单个\n不动,输出代码处理后的结果
最新发布
07-09
<html><head><meta http-equiv="Content-Type" content="text/html; charset= =iso-8859-1"> <title>Trioptics Certificate</title> <link type="text/css" rel="stylesheet" href="certificate.css"></link> <base href="file:///C:/Program%20Files%20(x86)/TRIOPTICS%20GmbH/MTF-LAB%2= 05/Certificates/"></base></head> <body id="IBodyCert" class="CBodyCert"> <!-- open certificate table --> <table align="left" id="ITableCert" class="CTableCert"> <!-- Header --> <tbody><tr id="ITRCompany" class="CTRHeader"> <td id="ITDCompany" class="CTDHeader"> <div id="IDivCompany" class="CDivHeader">ImageMaster - Certificate</div> </td> <td id="ITDLogo" class="CTDHeader"> <img src="./img/Trioptics-Logo-250x65.png" id="ITDLogo" class="CTDHea= der"> </td> </tr> <tr id="ITDSlogan" class="CTRHeader"> <td colspan="2" id="ITDSlogan" class="CTDHeader"> </td> </tr> <tr> <td colspan="2"> <pre>Company : ****** Operator : ****** Time/Date : 13:30:33 June 12, 2025 Sample ID : ****** Measure Program : MTF vs. Field Temperature : 20°C Measured with : <a href="http://www.trioptics.com/">TRIOPTICS</a> - MT= F-LAB - Vers. 5.16.1 Instrument S/N : 09-113-0519 Comments : SN215U0540 </pre> </td> </tr> <tr> <td colspan="2"> </td> </tr> <tr> <td colspan="2"> <hr> <b>Measurement Parameter: MTF vs. Image Height</b> <pre>Setup Type : Object Infinite / Image Finite EFL (Collimator): 50 mm Wavelength : 940 nm (NIR) EFL (Sample) : 1.5550 mm F-Number : 2.0000 Object Angle : -0.0198 ° Focus Position : 85.8471 Sample Azimuth : 0.0 ° </pre></td> </tr> <tr> <td colspan="2"> <hr> <b>Measurement Graph: MTF vs. Image Height</b> <br><br> <right> <img src="Chart12.png"> </right> </td> </tr> <tr> <td colspan="2"> <hr> <b>Measurement Table: MTF vs. Image Height</b> <br><br> <!-- open measurement table --> <table cellspacing="0" align="left" id="ITableDataItems" class="CTa= bleDataItems"> <!-- begin table caption --> <tbody><tr id="ITRDataCaption" class="CTRDataCaption"> <td id="ITDCaptionBlank" class="CTDCaptionBlank"></td> <td align="center" colspan="5" id="ITDDataCaption" class="CTDDataCa= ption">Image Height (mm)</td> </tr> <tr id="ITRDataCaption" class="CTRDataCaption"> <td id="ITDDataCaption" class="CTDDataCaption">MTF</td> <td id="ITDDataCaption" class="CTDDataCaption">0.42800</td> <td id="ITDDataCaption" class="CTDDataCaption">0.29960</td> <td id="ITDDataCaption" class="CTDDataCaption">-0.00114</td> <td id="ITDDataCaption" class="CTDDataCaption">-0.29960</td> <td id="ITDDataCaption" class="CTDDataCaption">-0.42800</td> <td id="ITDDataCaption" class="CTDDataCaption">Legend</td> </tr> <!-- end table caption --> <!-- begin measurement data --> <tr id="ITRDataItem" class="CTRDataItem"> <td id="ITDEven" class="CTDDataItem">Tan 100(lp/mm)</td> <td id="ITDEven" class="CTDDataItem">0.599</td> <td id="ITDEven" class="CTDDataItem">0.677</td> <td id="ITDEven" class="CTDDataItem">0.668</td> <td id="ITDEven" class="CTDDataItem">0.703</td> <td id="ITDEven" class="CTDDataItem">0.645</td> <td colspan="1" id="ITDLegend" class="CTDLegend"><font color="ff000= 0">— — —</font></td> </tr> <tr id="ITRDataItem" class="CTRDataItem"> <td id="ITDEven" class="CTDDataItem">Sag 100(lp/mm)</td> <td id="ITDEven" class="CTDDataItem">0.558</td> <td id="ITDEven" class="CTDDataItem">0.659</td> <td id="ITDEven" class="CTDDataItem">0.673</td> <td id="ITDEven" class="CTDDataItem">0.688</td> <td id="ITDEven" class="CTDDataItem">0.642</td> <td colspan="1" id="ITDLegend" class="CTDLegend"><font color="ff000= 0">————</font></td> </tr> <!-- end measurement data --> <!-- close measurement table --> </tbody></table><br clear="all"> </td> </tr> <tr> <td colspan="2"> <hr> <b>Measurement Parameter: MTF vs. Object Angle</b> <pre>Setup Type : Object Infinite / Image Finite EFL (Collimator): 50 mm Wavelength : 940 nm (NIR) EFL (Sample) : 1.5550 mm F-Number : 2.0000 Object Angle : -0.0198 ° Focus Position : 85.8471 Sample Azimuth : 0.0 ° </pre></td> </tr> <tr> <td colspan="2"> <hr> <b>Measurement Graph: MTF vs. Object Angle</b> <br><br> <right> <img src="Chart11.png"> </right> </td> </tr> <tr> <td colspan="2"> <hr> <b>Measurement Table: MTF vs. Object Angle</b> <br><br> <!-- open measurement table --> <table cellspacing="0" align="left" id="ITableDataItems" class="CTa= bleDataItems"> <!-- begin table caption --> <tbody><tr id="ITRDataCaption" class="CTRDataCaption"> <td id="ITDCaptionBlank" class="CTDCaptionBlank"></td> <td align="center" colspan="5" id="ITDDataCaption" class="CTDDataCa= ption">Object Angle (?</td> </tr> <tr id="ITRDataCaption" class="CTRDataCaption"> <td id="ITDDataCaption" class="CTDDataCaption">MTF</td> <td id="ITDDataCaption" class="CTDDataCaption">-15.33590</td> <td id="ITDDataCaption" class="CTDDataCaption">-10.72937</td> <td id="ITDDataCaption" class="CTDDataCaption">0.00072</td> <td id="ITDDataCaption" class="CTDDataCaption">10.77662</td> <td id="ITDDataCaption" class="CTDDataCaption">15.40352</td> <td id="ITDDataCaption" class="CTDDataCaption">Legend</td> </tr> <!-- end table caption --> <!-- begin measurement data --> <tr id="ITRDataItem" class="CTRDataItem"> <td id="ITDEven" class="CTDDataItem">Tan 100(lp/mm)</td> <td id="ITDEven" class="CTDDataItem">0.599</td> <td id="ITDEven" class="CTDDataItem">0.677</td> <td id="ITDEven" class="CTDDataItem">0.668</td> <td id="ITDEven" class="CTDDataItem">0.703</td> <td id="ITDEven" class="CTDDataItem">0.645</td> <td colspan="1" id="ITDLegend" class="CTDLegend"><font color="ff000= 0">— — —</font></td> </tr> <tr id="ITRDataItem" class="CTRDataItem"> <td id="ITDEven" class="CTDDataItem">Sag 100(lp/mm)</td> <td id="ITDEven" class="CTDDataItem">0.558</td> <td id="ITDEven" class="CTDDataItem">0.659</td> <td id="ITDEven" class="CTDDataItem">0.673</td> <td id="ITDEven" class="CTDDataItem">0.688</td> <td id="ITDEven" class="CTDDataItem">0.642</td> <td colspan="1" id="ITDLegend" class="CTDLegend"><font color="ff000= 0">————</font></td> </tr> <!-- end measurement data --> <!-- close measurement table --> </tbody></table><br clear="all"> </td> </tr> <!-- close certificate table --> </tbody></table> </body></html> 为啥这个内容调用QDomDocument的setContent会失败
06-28
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值