代码测试。
参考文献
: /* 设置页面背景颜色和字体样式 */ body { background-color: #f0f0f0; font-family: Arial, sans-serif; } /* 设置标题样式 */ h1 { color: #333; text-align: center; } /* 设置段落样式 */ p { line-height: 1.6; margin: 10px 0; } /* 设置导航栏样式 */ .nav-bar { background-color: #333; overflow: hidden; } .nav-bar a { float: left; display: block; color: #f2f2f2; text-align: center; padding: 14px 16px; text-decoration: none; } .nav-bar a:hover { background-color: #ddd; color: black; } /* 响应式设计 */ @media screen and (max-width: 600px) { .nav-bar a { float: none; display: block; text-align: left; } } : full source reference
除非特别注明,本页内容采用以下授权方式: Creative Commons Attribution-ShareAlike 3.0 License