css怎么设置字体颜色

CSS

1个回答

写回答

YYYY~

2022-08-24 03:07

+ 关注

可以使用color属性来设置字体颜色,例如:

p {

color: red;

}

上述代码会将所有p标签中的字体颜色设置为红色。也可以使用十六进制颜色值或rgb颜色值来设置颜色。例如:

p {

color: #333333; /* 使用十六进制颜色值 */

color: rgb(51, 51, 51); /* 使用rgb颜色值 */

}

举报有用(17分享收藏

Copyright © 2025 IZhiDa.com All Rights Reserved.

知答 版权所有 粤ICP备2023042255号