gpt4 book ai didi

css - Asp.net TextBox 改变颜色

转载 作者:行者123 更新时间:2023-11-28 07:50:58 24 4
gpt4 key购买 nike

如果我有让我们说聊天应用程序的 asp.net 多行文本框。我希望每个备用消息背景都有 2 种不同的颜色。就像我打字一样,前景色是黑色的,背景色是白色的。如果我再次输入一些东西,前景颜色仍然是黑色,但背景颜色是灰色。可能的人?示例:

enter image description here

最佳答案

在你的 css 中你可以使用 sudo 类 :nth-child(even) 和 :nth-child(odd)

.message:nth-child(odd) {
Color:white;
Background-color:black;
}

关于css - Asp.net TextBox 改变颜色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30419524/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com