-
碎语 | 主题自定义css代码
Twenty Twelve主题自定义Css文件内容,可以通过调整颜色、字体、布局等元素来改变页面的外观和感觉。将这些样式放入子主题中,以便日后查阅和修改。记得在使用这些自定义 CSS 时,确保更改不会影响到主题的更新。方便学习和查找。
/* 页脚整体样式 */ footer { text-align: center; /* 所有内容居中 */ } /* 版权信息 */ footer .copyright { font-size: 16px; /* 适中的字体大小 */ margin-bottom: 10px; /* 内容之间的间距 */ color: #003264; /* 字体颜色 */ } /* 页脚链接 */ footer .footer-links { font-size: 14px; /* 更小的字体 */ color: #3C82DC; /* 链接颜色 */ } footer .footer-links a { color: #3C82DC; /* 链接颜色 */ text-decoration: none; /* 去掉下划线 */ margin: 0 15px; /* 链接间距 */ } footer .footer-links a:hover { text-decoration: underline; /* 悬停时显示下划线 */ } /* 移动端适配 */ @media (max-width: 768px) { footer { padding: 10px; /* 减少内边距 */ } footer .copyright { font-size: 14px; /* 调整字体大小 */ } footer .footer-links { font-size: 14px; /* 更小的字体 */ } } a { color: #3C82DC; } a:hover { color: #005EBB; } /* 美化标签方框 */ .tagcloud { display: flex; flex-wrap: wrap; gap: 12px; /* 标签之间适度间距 */ } .tagcloud a { display: flex; justify-content: center; align-items: center; border: 1px solid #E5F1FB; /* 精致的浅金色边框 */ color: #3C82DC !important; /* 深灰色字体 */ padding: 6px 14px !important; /* 较小的内边距 */ margin: 0 !important; border-radius: 2px !important; /* 圆角效果 */ font-size: 13px !important; /* 小巧的字体 */ text-decoration: none !important; transition: all 0.3s ease; min-width: 80px; /* 较小的最小宽度 */ height: 45px; /* 较小的高度 */ box-sizing: border-box; } .tagcloud a:hover { background-color: #0066CC !important; /* 悬停时浅金色背景 */ color: #fff !important; /* 悬停时文字颜色变为白色 */ transform: scale(1.05) !important; /* 放大效果更温和 */ }
Twenty Twelve/your-theme-child版本:4.4
2025年2月26日19:59 阅读: 65