LLWiki正在建设中,欢迎加入我们!
MediaWiki:Gadget-code-prettify.css
跳转到导航
跳转到搜索
注意:在保存之后,您可能需要清除浏览器缓存才能看到所作出的变更的影响。
- Firefox或Safari:按住Shift的同时单击刷新,或按Ctrl-F5或Ctrl-R(Mac为⌘-R)
- Google Chrome:按Ctrl-Shift-R(Mac为⌘-Shift-R)
- Internet Explorer:按住Ctrl的同时单击刷新,或按Ctrl-F5
- Opera:前往菜单 → 设置(Mac为Opera → Preferences),然后隐私和安全 → 清除浏览数据 → 缓存的图片和文件。
/* <nowiki> */ /* 1. 语法高亮,参考自[[mw:Extension:SyntaxHighlight]],以下按色调排序 */ .hljs-literal, .hljs-number { color: #a2f; } .hljs-regexp, .hljs-selector-pseudo { color: #b68; } .hljs-subst { /* JS模板字符串 */ color: #b68; font-weight: bold; } .hljs-string { color: #ba2121; } .hljs-meta { /* JS的strict模式和CSS的!important */ color: #cb4b16; } .hljs-type, .hljs-variable { /* JS文档的参数类型和名称 */ color: #b58900; font-weight: normal; font-style: normal; } .hljs-attribute { /* CSS属性 */ color: #b58900; font-weight: bold; } .hljs-attr { /* JS对象键值 */ color: #7d9029; } .hljs-keyword, .hljs-selector-tag, .hljs-doctag, .hljs-name { /* HTML的tag名称 */ color: #008000; font-weight: bold; font-style: normal; } .hljs-comment { color: #408080; font-style: italic; font-weight: normal; } .hljs-title, /* 声明的JS函数名 */ .hljs-selector-attr { color: #268bd2; } .hljs-selector-class, .hljs-built_in { /* JS内置变量、CSS内置函数 */ color: #00f; } .hljs-selector-id { color: #00f; font-weight: bold; } /* 2. 标注颜色,仅支持16进制和rgb/rgba */ .hljs-color { vertical-align: text-bottom; } .hljs-color::after { content: "⬤ "; /* Safari */ font-size: 0.75em; text-shadow: 0 0 1px #000; } /* 3. 代码块 */ .highlighted { padding: 1px 4px; /* 同<code> */ } .skin-minerva .highlighted { padding: 0.2em 0.5em; /* 同<code> */ } .highlighted.linenums { padding: 0; border-color: #c8ccd1; /* 桌面版略微加深边框颜色以适应底色 */ } .linenums > ol { margin: 0; /* 仿照手机版移除margin,并由JS指定padding-left */ } @media only screen and (max-width:720px) { /* 窄屏隐藏行号 */ .linenums:not(.scroll) > ol { padding-left: 0 !important; list-style-type: none; /* 仅供参考:萌百选择了list-style-position: inside; */ } } .linenums li { padding: 0 4px; margin-bottom: 0; /* 保证交错底色等宽 */ line-height: 1.5; } .linenums li:nth-child(2n) { background-color: #eee; } .linenums li:empty::before { content: ""; /* 撑行高 */ display: inline-block; } .scroll.linenums { overflow-x: auto; } .scroll.linenums > ol { width: max-content; min-width: 100%; box-sizing: border-box; } .highlighted a { text-decoration: underline; } /* </nowiki> */ /* [[category:CSS小工具]] [[category:默认开启的小工具]] [[category:阅读工具]] [[category:桌面版小工具]] [[category:手机版小工具]] */ /* {{DEFAULTSORT:code-prettify.css}} */