gpt4 book ai didi

c# - Style.Add 扭曲字符串,用 "%20"替换空格

转载 作者:行者123 更新时间:2023-11-28 10:30:37 25 4
gpt4 key购买 nike

string backgroundImage = "url(http://path/alert.png), linear-gradient(-45deg, #8c7814 0%, #a99118 100%)"
panel.Style.Add("background-image", backgroundImage);

现在,在立即窗口中,我这样做:

panel.Style.Value

导致:

"background-image:url(http://path/alert.png),%20linear-gradient(-45deg,%20#8c7814%200%,%20#a99118%20100%);"

什么给了?

最佳答案

根据 DaveParson 的建议,改用“后台”速记是解决此问题的关键。

关于c# - Style.Add 扭曲字符串,用 "%20"替换空格,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23540176/

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