2017-02-17 73 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