2016-07-26 5 views
0

아래 코드 (ui.r)를 사용하여 ID가 ​​test_type 인 siderbarPanel의 글꼴 크기와 색상을 변경하려고하는데 작동하지 않습니까?Shiny R에서 글꼴 크기와 색상을 변경해도 작동하지 않습니까?

tags$head(tags$style("#test_type{color: red; font-size: 20px; font-style: italic; }" ) )

어떤 생각 ?

+0

'sidebarPanel'는 id 매개 변수가없는 확인합니까 : 당신은 그렇게 할 수 있습니다. 다른 의미가 있니? – Carl

답변

0

ui에서 입력 필드 요소의 색과 글꼴을 변경한다고 가정합니다. 당신이 sidebarPanel 자체를 사용자 정의 할 찾고

sidebarPanel(
    tags$head(tags$style(type="text/css", 
       ".test_type {color: red; 
          font-size: 20px; 
          font-style: italic;}" 
         ) 
      ), 
    div(class="test_type", 
     textInput(inputId="ti1", label="Text Input 1", value = "test")) 
) 

그러나 경우, 다음

R shiny - background of sidebar panel