MediaWiki:Print.css
外观
注意:保存之后,你必须清除浏览器缓存才能看到做出的更改。Google Chrome、Firefox、Microsoft Edge及Safari:按住⇧ Shift键并单击工具栏的“刷新”按钮。参阅Help:绕过浏览器缓存以获取更多帮助。
/* <nowiki> */
/* 标题与内容字体互换,优化纸张打印效果*/
html, body {
font-family: serif;
}
.mw-body h1, .mw-body h2, .mw-body h3, .mw-body h4, .mw-body h5, .mw-body h6 {
font-family: sans-serif;
}
.inline-unihan {
border-bottom: none !important;
}
/* Do not print:
1: When in mainspace: Article message boxes,
navboxes, sister project boxes, disambig links,
and items marked as metadata.
2: Privacy, about, disclaimer, redirect and section edit links.
3: Show/hide toggles for collapsible items.
4: Items marked as noprint.
*/
.ns-0 .ambox,
.ns-0 .infobox.sisterproject,
.ns-0 .metadata,
.ns-0 .mbox-small,
.editlink,
a.NavToggle, span.collapseButton, span.mw-collapsible-toggle,
.ns-0 .mw-indicators,
.ns-0 .mw-cite-backlink,
.ns-0 .stub,
#filetoc,
#footer-places,
#privacy, #about, #disclaimer,
#catlinks,
span#coordinates,
span.toctoggle,
th .sortkey, td .sortkey
.noprint {
display: none !important;
}
/* Add formatting to make sure that "external references" from templates
like [[Template:Ref]] do not get URL expansion, not even when printed.
The anchor itself has class "external autonumber" and the url expansion
is inserted when printing (see the common printing style sheet at
http://en.wikipedia.org/w/skins/common/commonPrint.css) using the
":after" pseudo-element of CSS. Also hide in <cite> elements.
*/
#content cite a.external.text:after,
.nourlexpansion a.external.text:after,
.nourlexpansion a.external.autonumber:after {
display: none !important;
}
/* Uncollapse collapsible tables/divs.
The proper way to do this for tables is to use display:table-row,
but this is not supported by all browsers, so use display:block as fallback.
*/
table.collapsible tr, div.NavPic, div.NavContent {
display: block !important;
}
table.collapsible tr {
display: table-row !important;
}
/* Hiding some items when printing with Simple skin */
.skin-simple div#column-one,
.skin-simple div#f-poweredbyico,
.skin-simple div#f-copyrightico,
.skin-simple .editsection {
display: none;
}
/* Restoring font size */
/* #bodyContent {
font-size: 100% !important;
} */
/* Hide [show]/[hide] links */
.NavToggle {
display: none !important;
}
/* On websites with siteSub visible, the margin on the firstHeading is not needed. */
#firstHeading {
margin: 0;
}
/* 消除{{fact}}的文字背景颜色 */
mark.template-facttext{
background-color:transparent;
}
/* We don't want very long URLs (that are added to the content in print) to widen the canvas */
#content a.external.text:after,
#content a.external.autonumber:after {
word-wrap: break-word;
}
/*避免分页断行*/
blockquote,table,pre,.toc{
page-break-inside:avoid;
}
.toc{
box-decoration-break: clone;
}
/*
- Basic infobox styling
- Remove background colors, they are hard to print
*/
.infobox {
border: solid 1px #aaa;
background-color: #fff;
border-spacing: 0;
border-collapse: collapse;
width: 180pt !important; /*T174957*/
}
.infobox > * > tr > td,
.infobox > * > tr > th {
padding: 2px 5px;
border-bottom: 1px solid #EAECF0;
}
/* Reduce noise for print medium - labels may be links */
.infobox a,
/* reset last border (set above) of infobox */
.infobox > * > tr:last-child > th,
.infobox > * > tr:last-child > td {
border: 0;
}
/* References */
.refbegin a,
.references a,
.reference a {
color: black !important;
}
.printfooter {
clear:both;
}
/* </nowiki> */