2013-04-19 3 views
0

분할 된 응용 프로그램에서 배경색을 변경할 수 없습니다. 나는 css를 사용하여 이미 tryed했기 때문에, 그리고 어떤 성공도없이, 어떻게, 모르겠다.Windows store app - item 배경색의

<div class="itemtemplate" data-win-control="WinJS.Binding.Template"> 
    <div class="item"> 
     <img class="item-image" src="#" data-win-bind="src: backgroundImage; alt: title" /> 
     <div class="item-info"> 
      <h3 class="item-title win-type-ellipsis" data-win-bind="textContent: title"></h3> 
      <h6 class="item-subtitle win-type-ellipsis" data-win-bind="textContent: subtitle"></h6> 
      <h4 class="item-description" data-win-bind="textContent: description"></h4> 
     </div> 
    </div> 
</div> 

CSS의 시도 :

이 항목에 대한 템플릿 (거의 기본값)

.item { 
    background-color: red; 
} 

그리고 이것은 같은 모습입니다 : 또한 enter image description here

, 내가 원하는 이 바이올렛 컬러를 변경하고, 바이올렛 (hover?) 주변의 밝은 회색 컬러를 다른 것으로 변경하십시오.

당신이 ListView에 대한 템플릿을 사용하고 있습니까 : 보라색 색상을 변경하려면 두 번째 질문에 대해서는

+0

HTML 코드에서 사용되는 모든 클래스를 추가 할 수 있습니까? 이렇게하면 문제를 찾는 데 도움이됩니다. 배경색 : –

+0

배경색 : background : # xxxxxx' – zik

답변

1

? 내 응용 프로그램에서 이것을 사용하여 기본 CSS를 재정의합니다. 참고 : 이것은 응용 프로그램의 모든 ListView를 변경합니다.

.win-selectionhint, 
.win-listview:not(.win-selectionstylefilled) .win-container.win-selected:hover .win-selectionborder, 
.win-listview:not(.win-selectionstylefilled) .win-selectioncheckmarkbackground, 
.win-listview:not(.win-selectionstylefilled) .win-container.win-selected:hover .win-selectioncheckmarkbackground, 
.win-listview.win-rtl:not(.win-selectionstylefilled) .win-container.win-selected:hover .win-selectioncheckmarkbackground, 
.win-listview.win-rtl:not(.win-selectionstylefilled) .win-selectioncheckmarkbackground, 
:not(.win-selectionstylefilled).win-listview .win-selectioncheckmarkbackground, 
:not(.win-selectionstylefilled).win-listview .win-selected.win-container .win-selectionborder { 
    border-color: transparent; /* <----- COLOR HERE. */ 
} 

이렇게하면 선택한 목록 항목 주변의 색상이 제거되고 선택한 항목의 호버링 색상도 제거됩니다.

+0

이 코드를 붙이려고 했는데도 여전히 동일합니다 ... 같은 색상의 것 – Clem

+0

ListView @Klemzy를 사용하고 있습니까? 빨간색 배경에 관한 주요 질문에 대해서는 더 많은 코드를 제공해야 도움이됩니다. 렌더링을위한 대상 div가 있습니까? 이것은 나쁜 일이지만 당신의 CSS에서 이것을 시도하십시오 :'.win-template {background-color : red! important; }'그리고 전체 항목이 빨간색인지 확인하십시오. –

+0

예 listview를 사용합니다. 내가 말했듯이, 나는 스튜디오 자체에서 기본 분할 예제를 사용하고 거기서 나는이 바이올렛 컬러를 바꿀 수 없다. – Clem

관련 문제