首页
随机
附近
登录
设置
关于陋室
免责声明
陋室
搜索
查看“︁Template:Navbox/styles.css”︁的源代码
←
Template:Navbox/styles.css
因为以下原因,您没有权限编辑该页面:
您请求的操作仅限属于这些用户组的用户执行:
用户
、
自动确认用户
您可以查看和复制此页面的源代码。
/* ============================= */ /* Navbox 样式优化 */ /* ============================= */ .navbox { text-align: center; /* 使内容居中 */ font-size: 0.8em; /* 比正文稍小 */ line-height: 1.2; /* 行间距略小 */ margin: 2px auto; /* 让 .navbox 在页面上水平居中,并减少四周的间距 */ max-width: 800px; /* 限制最大宽度,避免过宽 */ display: flex; /* 使用 flexbox 代替 table 布局 */ flex-direction: column; /* 使子元素垂直排列 */ justify-content: center; /* 水平居中 */ align-items: center; /* 垂直居中 */ width: 100%; border-collapse: collapse; } /* Navbox 表格单元格样式 */ .navbox td, .navbox th { text-align: center; /* 水平居中 */ vertical-align: middle; /* 垂直居中 */ padding: 4px 8px; /* 调整内边距,使内容不那么拥挤 */ border: none; } /* Navbox 内部分割线优化 */ .navbox hr { margin: 2px 0; /* 减小水平分割线的上下间距 */ border: none; border-top: 1px solid #ccc; /* 稍微加深分割线颜色 */ } /* ============================= */ /* Infobox 样式优化 */ /* ============================= */ .infobox { max-width: 300px; /* 设置信息框的最大宽度 */ width: 100%; /* 允许其在容器内自适应 */ margin: 0 auto; /* 使 .infobox 居中 */ border: 1px solid #ddd; /* 添加一个轻微的边框 */ border-radius: 8px; /* 让边框变得圆润 */ background-color: #f9f9f9; /* 设置轻微的背景色 */ box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); /* 为 .infobox 添加阴影效果 */ padding: 10px; /* 增加内边距使内容不显得紧凑 */ } /* 限制 Infobox 第一列宽度(约 5 个汉字) */ .infobox td:first-child, .infobox th:first-child { width: 12em; /* 增加第一列宽度 */ min-width: 12em; /* 确保不会缩小 */ } /* ============================= */ /* 辅助样式(可选) */ /* ============================= */ /* 为链接增加悬停效果 */ .navbox a { padding: 0 5px; /* 给每个链接添加左右内边距 */ text-decoration: none; color: #0066cc; } .navbox a:hover { color: #005bb5; /* 悬停时更改颜色 */ text-decoration: underline; /* 添加下划线效果 */ } /* 响应式优化 */ @media (max-width: 480px) { .navbox { font-size: 14px; } .navbox td, .navbox th { padding: 6px 8px; display: block; width: 100%; box-sizing: border-box; } }
返回
Template:Navbox/styles.css
。