gpt4 book ai didi

css - 在 WinJS Windows 8 应用程序中,如何更改 ListView 中所选元素的突出显示颜色?

转载 作者:行者123 更新时间:2023-11-28 09:47:42 25 4
gpt4 key购买 nike

我想在选择 WinJS Listivew 元素时更改 CSS 样式,如图所示。

Enter image description here

基本上我希望紫色部分变成灰色,我猜这应该通过 CSS 来完成,因为我们在 WinJS 中。

win-selectionborder
win-selectionbackground
win-selectionhint
win-selectioncheckmark
win-selectioncheckmarkbackground

我已经尝试了所有这些,但它们都给出了奇怪的结果,改变了除此之外的一切。

最佳答案

这是我的免费电子书第 5 章的图片,Programming Windows Store Apps with HTML, CSS, and JavaScript, Second Edition ,在这里我展示了所有样式如何与复选框相关。这些具体位于名为“样式库:WinJS 控件”的部分中。在这些图像中,我展示了默认样式与自定义样式的对比。您会发现诀窍实际上是为样式层次结构选择正确的选择器,因为它通常不仅仅是您必须关注的单个类。另请注意,使用 .win-selectionstylefilled 可以区分大纲样式和大纲样式。

另请注意,我在此处显示的样式不限于特定列表或页面; gbellman 的回答给出了其中的一些。

item container styling 1

item container styling 2

item container styling 3

关于css - 在 WinJS Windows 8 应用程序中,如何更改 ListView 中所选元素的突出显示颜色?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26251028/

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