MediaWiki 自定义CSS

MediaWiki 自定义CSS

进入

MediaWiki:Vector.css
特殊页面,然后编辑你要覆盖重写的CSS内容

MediaWiki:Vector.css 页面

提供个不错的主题CSS: DarkVector主题CSS

给默认的vector加上本博客的样式

#p-tb {
    margin-top: 10px;
}
.mw-body p {
    font-size: 16px;
    color: #444;
}
pre, .mw-code {
    display: block;
    overflow-x: auto;
    padding: 20px !important;
    background: #edf0f3 !important;
    border: none !important;
    font-family: 'Consolas','Courier New',Courier,monospace !important;
    font-size: 14px !important;
}

div#mw-panel #p-logo + div.portal div.body {
    margin: 0;
}
div#mw-panel div.portal {
    background-image: none;
}
div#mw-panel div.portal div.body {
    margin: 0;
}

div#mw-panel div.portal div.body ul {
    border-top: 10px solid #CAD2DE;
    background: #2B497B;    
}

div#mw-panel div.portal div.body ul li {
    border-bottom: 1px dotted #fff;
    padding: 0.2em 10px;
    line-height: 15px;
}

div#mw-panel div.portal div.body ul li:hover {
    background: #A3181E;
}

div#mw-panel div.portal div.body ul li a {
    font-size: 10px;
    display: block;
    color: #FFF;
    font-weight: normal;
    text-decoration: none;
    text-transform: uppercase;
}

div#mw-panel div.portal div.body ul li a:visited {
    color: #EEE;
}

div#mw-panel div.portal h3 {
    font-size: 15px;
    background: #A3181E;
    color: white;
    display: block;
    padding: 5px 10px;
}


.mw-body h1 {
    font-size: 2.5em;
    font-family: "微软雅黑";
    font-weight: normal;
}

.mw-body h2 {
    font-size: 2em;
    margin: 1em 0 0.25em;
    padding: 10px 0px;
    border-bottom: 5px solid #F1F4F9;
    font-family: "微软雅黑";
    font-weight: bold;
}

.mw-body h3:before {
    content: "\25BA ";
}

.mw-body a.external {
    text-decoration: none;
    color: orange !important;
    border-bottom: 1px dashed;
    padding-bottom: 2px;
}

.mw-body a.external:before {
    content: "\27A5";
}

.mw-body code {
    font-family: "Courier New",sans-serif !important;
    font-size: 12px !important;
    background-color: #f5f5f5 !important;
    padding: 0 5px !important;
    border-radius: 3px !important;
    border:none;
    line-height: 1.8;
    margin: 1px 5px;
    vertical-align: middle;
    display: inline-block;
}

.mw-body blockquote {
    background-color: #f7f7f7;
    word-break: break-word;
    font-weight: 400;
    line-height: 30px;
    padding: 1.5em;
    background: #E1E8FB;
    border-left: 5px solid #D2D8FB;
    margin: 10px 10px 10px 0px;
}

#catlinks {
    background-color: #f1f4f9;
    color: #f1f4f9;
    padding: 10px 0px;
    border: none;
}

#catlinks li {
    border: none;
}

#catlinks li a:link {
    position: relative;
    display: inline-block;
    height: 30px;
    padding: 0 12px;
    line-height: 30px;
    vertical-align: top;
    text-decoration: none;
    background: #fff;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 11px;
}
 
#catlinks li a:hover{
    background: #237dac;
    color: white;
}

#mw-normal-catlinks > a {
    position: relative;
    display: inline-block;
    height: 30px;
    padding: 0px 0px 0px 20px;
    line-height: 30px;
    vertical-align: top;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 11px;
}

/* 编辑按钮 */
.editButtons input  {
    color: #fff;
    background-color: #1890ff;
    border-color: #1890ff;
    text-shadow: 0 -1px 0 rgba(0,0,0,0.12);
    -webkit-box-shadow: 0 2px 0 rgba(0,0,0,0.045);
    box-shadow: 0 2px 0 rgba(0,0,0,0.045);
    line-height: 1.5;
    position: relative;
    display: inline-block;
    font-weight: 400;
    white-space: nowrap;
    text-align: center;
    background-image: none;
    border: 1px solid transparent;
    -webkit-box-shadow: 0 2px 0 rgba(0,0,0,0.015);
    box-shadow: 0 2px 0 rgba(0,0,0,0.015);
    cursor: pointer;
    -webkit-transition: all .3s cubic-bezier(.645, .045, .355, 1);
    transition: all .3s cubic-bezier(.645, .045, .355, 1);
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -ms-touch-action: manipulation;
    touch-action: manipulation;
    height: 32px;
    padding: 0 15px;
    font-size: 14px;
    border-radius: 4px;
    border-color: #d9d9d9;
}

.editButtons input  {
    color: #fff;
    background-color: #1890ff;
    border-color: #1890ff;
    text-shadow: 0 -1px 0 rgba(0,0,0,0.12);
    -webkit-box-shadow: 0 2px 0 rgba(0,0,0,0.045);
    box-shadow: 0 2px 0 rgba(0,0,0,0.045);
    line-height: 1.5;
    position: relative;
    display: inline-block;
    font-weight: 400;
    white-space: nowrap;
    text-align: center;
    background-image: none;
    border: 1px solid transparent;
    -webkit-box-shadow: 0 2px 0 rgba(0,0,0,0.015);
    box-shadow: 0 2px 0 rgba(0,0,0,0.015);
    cursor: pointer;
    -webkit-transition: all .3s cubic-bezier(.645, .045, .355, 1);
    transition: all .3s cubic-bezier(.645, .045, .355, 1);
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -ms-touch-action: manipulation;
    touch-action: manipulation;
    height: 32px;
    padding: 0 15px;
    font-size: 14px;
    border-radius: 4px;
    border-color: #d9d9d9;
}

.editButtons input:hover {
    background-color: #40a9ff;
}

.editButtons input  {
    color: #fff;
    background-color: #1890ff;
    border-color: #1890ff;
    text-shadow: 0 -1px 0 rgba(0,0,0,0.12);
    -webkit-box-shadow: 0 2px 0 rgba(0,0,0,0.045);
    box-shadow: 0 2px 0 rgba(0,0,0,0.045);
    line-height: 1.5;
    position: relative;
    display: inline-block;
    font-weight: 400;
    white-space: nowrap;
    text-align: center;
    background-image: none;
    border: 1px solid transparent;
    -webkit-box-shadow: 0 2px 0 rgba(0,0,0,0.015);
    box-shadow: 0 2px 0 rgba(0,0,0,0.015);
    cursor: pointer;
    -webkit-transition: all .3s cubic-bezier(.645, .045, .355, 1);
    transition: all .3s cubic-bezier(.645, .045, .355, 1);
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -ms-touch-action: manipulation;
    touch-action: manipulation;
    height: 32px;
    padding: 0 15px;
    font-size: 14px;
    border-radius: 4px;
    border-color: #d9d9d9;
}

.editButtons input:hover {
    background-color: #40a9ff;
}

#wpSave {
    background-color: #009100;
}

#wpSave:hover {
    background-color: #00A600;
}

.mango-alert {
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    margin: 0;
    color: rgba(0,0,0,0.65);
    font-size: 14px;
    font-variant: tabular-nums;
    line-height: 1.5;
    list-style: none;
    font-feature-settings: 'tnum';
    position: relative;
    padding: 8px 15px 8px 37px;
    word-wrap: break-word;
    border-radius: 4px;
    margin: 10px 0px 10px 0px;
}

.mango-alert-info {
    background-color: #e6f7ff;
    border: 1px solid #91d5ff;
}

.mango-alert-warn {
    background-color: #fffbe6;
    border: 1px solid #ffe58f
}

.mango-alert-error {
    background-color: #fff1f0;
    border: 1px solid #ffa39e;
}

/**
 * 左侧导航栏拓宽
 */

div#mw-panel {
    width: 13em;
}

.mw-body {
    margin-left: 14em;
}

#left-navigation {
    margin-left: 14em;
}

#p-logo a {
    width: 13em;
}

div#footer {
    margin-left: 13em;
}


/**
 * 表格样式
 */

table.wikitable {
        border: none !important;
}

table.wikitable td {
        border: none !important;
        padding: 0.2em 2em !important;
}

/*设置奇数行颜色*/
table.wikitable  tr:nth-child(odd) {
    background: #EEE;
}

/*设置偶数行颜色*/
table.wikitable  tr:nth-child(even) {
    background: #FFF;
}

table.wikitable th {
    background-color: #2894FF !important;
    color: white;
    text-align: center;
    font-weight: bold;
    letter-spacing: 1em;
    border: none !important;
        padding: 0.2em 2em !important;
}

table.wikitable tr:nth-child(1) {
    background-color: #2894FF;
    color: white;
    text-align: center;
    font-weight: bold;
    letter-spacing: 1em;
}

table.wikitable tbody:last-child {
    border-bottom: 1px solid;
}

发表评论

电子邮件地址不会被公开。 必填项已用*标注

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据