2017-02-17 74 views
0

我想在使用CSS的R Shiny應用程序中關閉selectInput()的焦點。重點:沒有不適用於R中的selectInput Shiny

enter image description here

不應該在.selectize-input.focus選擇以下聲明做到這一點?

.selectize-input.focus { focus: none; }

現在,我只是用這個。箱子仍然集中,但它明顯而不是藍色。

.selectize-input.focus { border-color: rgba(0, 0, 0, 0); }

謝謝!

回答

2

要刪除的藍色高亮各地集中SelectInput,您可以使用此風格:

shinyApp(fluidPage(
      tags$head(
       tags$style(HTML(".selectize-input.focus { 
            border-color: #cccccc; 
            -webkit-box-shadow: none; 
            box-shadow: none; 
           }")) 
      ), 
      selectInput("input1", "input1", c("1","2"),"1")), 
     server=function(input, output){}) 

你會發現幾個答案有:How come I can't remove the blue textarea border in Twitter Bootstrap?

+0

HubertL, 謝謝你的澄清CSS。不幸的是,我運行你的代碼,並沒有達到我想要的。當我選擇一個選項時,藍色突出顯示仍然存在。 – awunderground

+0

謝謝你的徹底例子。這解決了我的一個大問題! – awunderground