|
|
好的,让我们给代码中的文字修改成黄色。在CSS样式表中,颜色可以使用英文单词或者十六进制颜色码来表示。现在,我们来把代码中所有的文字颜色改成黄色:
- body {
- display: flex;
- justify-content: center;
- align-items: center;
- height: 100vh;
- margin: 0;
- color: yellow; /* 这里改为黄色 */
- }
- .game-container {
- position: relative;
- width: 400px;
- height: 400px;
- border: 1px solid #000;
- }
- .snake, .food {
- position: absolute;
- width: 20px;
- height: 20px;
- background-color: green;
- }
- .food {
- background-color: red;
- }
复制代码
这样就把字体颜色改成黄色了。希望对你有所帮助!如果还有其他问题,欢迎继续提问哦~ |
|