打开/关闭菜单
打开/关闭外观设置菜单
打开/关闭个人菜单
未登录
未登录用户的IP地址会在进行任意编辑后公开展示。

MediaWiki:Common.css

MediaWiki界面页面
Null留言 | 贡献2025年4月10日 (四) 08:56的版本

注意:在发布之后,您可能需要清除浏览器缓存才能看到所作出的更改的影响。

  • Firefox或Safari:按住Shift的同时单击刷新,或按Ctrl-F5Ctrl-R(Mac为⌘-R
  • Google Chrome:Ctrl-Shift-R(Mac为⌘-Shift-R
  • Edge:按住Ctrl的同时单击刷新,或按Ctrl-F5
/* 在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;
  }
}