更多操作
小 |
小 |
||
第1行: | 第1行: | ||
/* | /* 在MediaWiki的Common.css文件中添加以下代码 */ | ||
@font-face { | @font-face { | ||
font-family: 'LXGWWenKaiLite'; | font-family: 'LXGWWenKaiLite'; | ||
src: | src: url('https://www.guohao.asia/cdn/font/lxgw-wenkai-lite/LXGWWenKaiLite-Light.ttf') format('truetype'); | ||
font-weight: 300; /* Light */ | |||
font-weight: 300; | |||
font-style: normal; | font-style: normal; | ||
} | } | ||
/ | @font-face { | ||
font-family: 'LXGWWenKaiLite'; | |||
@font-face { /* Regular */ } | src: url('https://www.guohao.asia/cdn/font/lxgw-wenkai-lite/LXGWWenKaiLite-Medium.ttf') format('truetype'); | ||
font-weight: 500; /* Medium */ | |||
font-style: normal; | |||
} | |||
@font-face { | |||
font-family: 'LXGWWenKaiLite'; | |||
src: url('https://www.guohao.asia/cdn/font/lxgw-wenkai-lite/LXGWWenKaiLite-Regular.ttf') format('truetype'); | |||
font-weight: 400; /* Regular */ | |||
font-style: normal; | |||
} | |||
@font-face { | @font-face { | ||
font-family: 'LXGWWenKaiMonoLite'; | font-family: 'LXGWWenKaiMonoLite'; | ||
src: url('https://www.guohao.asia/cdn/font/lxgw-wenkai-lite/LXGWWenKaiMonoLite- | src: url('https://www.guohao.asia/cdn/font/lxgw-wenkai-lite/LXGWWenKaiMonoLite-Light.ttf') format('truetype'); | ||
font-weight: 300; /* Light */ | |||
font-weight: | |||
font-style: normal; | font-style: normal; | ||
} | } | ||
@font-face { | |||
font-family: 'LXGWWenKaiMonoLite'; | |||
src: url('https://www.guohao.asia/cdn/font/lxgw-wenkai-lite/LXGWWenKaiMonoLite-Medium.ttf') format('truetype'); | |||
--font- | font-weight: 500; /* Medium */ | ||
-- | font-style: normal; | ||
} | |||
@font-face { | |||
font-family: 'LXGWWenKaiMonoLite'; | |||
src: url('https://www.guohao.asia/cdn/font/lxgw-wenkai-lite/LXGWWenKaiMonoLite-Regular.ttf') format('truetype'); | |||
font-weight: 400; /* Regular */ | |||
font-style: normal; | |||
} | } | ||
/* 应用字体 */ | |||
body { | body { | ||
font-family: | font-family: 'LXGWWenKaiLite', sans-serif; | ||
} | } | ||
#content h1, #content h2 { | #content h1, | ||
font-family: | #content h2 { | ||
font-family: 'LXGWWenKaiLite', serif; | |||
} | } | ||
code, pre, tt { | code, pre, tt { | ||
font-family: | font-family: 'LXGWWenKaiMonoLite', monospace; | ||
} | } | ||
/* | /* 基本样式,适用于所有图片 */ | ||
img[src*="www.guohao.asia"] { | img[src*="www.guohao.asia"] { | ||
height: auto; | height: auto; | ||
max-width: 100%; /* 确保图片不会超出其父容器的宽度 */ | |||
max-width: 100%; | |||
} | } | ||
/* | /* 媒体查询,仅当屏幕宽度大于450像素时应用 */ | ||
@media (min-width: 450px) { | |||
width: | img[src*="www.guohao.asia"] { | ||
width: 80%; | |||
} | |||
} | } | ||
@media only screen and (max-width: 600px) { | |||
/* 针对手机的样式 */ | |||
@media (max-width: 600px) { | |||
.ev-video { | .ev-video { | ||
width: 100%; | width: 100%; | ||
height: auto; | height: auto; | ||
} | } | ||
} | } |
2025年4月10日 (四) 08:56的版本
/* 在MediaWiki的Common.css文件中添加以下代码 */
@font-face {
font-family: 'LXGWWenKaiLite';
src: url('https://www.guohao.asia/cdn/font/lxgw-wenkai-lite/LXGWWenKaiLite-Light.ttf') format('truetype');
font-weight: 300; /* Light */
font-style: normal;
}
@font-face {
font-family: 'LXGWWenKaiLite';
src: url('https://www.guohao.asia/cdn/font/lxgw-wenkai-lite/LXGWWenKaiLite-Medium.ttf') format('truetype');
font-weight: 500; /* Medium */
font-style: normal;
}
@font-face {
font-family: 'LXGWWenKaiLite';
src: url('https://www.guohao.asia/cdn/font/lxgw-wenkai-lite/LXGWWenKaiLite-Regular.ttf') format('truetype');
font-weight: 400; /* Regular */
font-style: normal;
}
@font-face {
font-family: 'LXGWWenKaiMonoLite';
src: url('https://www.guohao.asia/cdn/font/lxgw-wenkai-lite/LXGWWenKaiMonoLite-Light.ttf') format('truetype');
font-weight: 300; /* Light */
font-style: normal;
}
@font-face {
font-family: 'LXGWWenKaiMonoLite';
src: url('https://www.guohao.asia/cdn/font/lxgw-wenkai-lite/LXGWWenKaiMonoLite-Medium.ttf') format('truetype');
font-weight: 500; /* Medium */
font-style: normal;
}
@font-face {
font-family: 'LXGWWenKaiMonoLite';
src: url('https://www.guohao.asia/cdn/font/lxgw-wenkai-lite/LXGWWenKaiMonoLite-Regular.ttf') format('truetype');
font-weight: 400; /* Regular */
font-style: normal;
}
/* 应用字体 */
body {
font-family: 'LXGWWenKaiLite', sans-serif;
}
#content h1,
#content h2 {
font-family: 'LXGWWenKaiLite', serif;
}
code, pre, tt {
font-family: 'LXGWWenKaiMonoLite', monospace;
}
/* 基本样式,适用于所有图片 */
img[src*="www.guohao.asia"] {
height: auto;
max-width: 100%; /* 确保图片不会超出其父容器的宽度 */
}
/* 媒体查询,仅当屏幕宽度大于450像素时应用 */
@media (min-width: 450px) {
img[src*="www.guohao.asia"] {
width: 80%;
}
}
@media only screen and (max-width: 600px) {
/* 针对手机的样式 */
.ev-video {
width: 100%;
height: auto;
}
}