html - 为什么 shinydashboard 将 numericInput 的角从圆形更改为 90 度?
问题描述
我有以下两个脚本创建一个numericInput
和一个selectInput
字段。一个在shiny
,另一个在shinydashboard
。我还创建了指向这两个示例的 shinyapps.io 链接。
我的问题是为什么shinydashboard
将角更改numericInput
为 90 度?请看截图。在示例 1 中,两个输入字段都有圆角。
但是,在示例 2 中,角numericInput
变成 90 度。
如果有人可以帮助我理解这种行为并开发一种方法来使所有的角落都变成圆形或 90 度,那就太好了。
示例 1(https://yuchenw.shinyapps.io/Corner_Input_Example1/)
# Load the packages
library(shiny)
# User Interface
ui <- fluidPage(
numericInput(inputId = "Number", label = "A numericInput with round corner", value = NA),
selectInput(inputId = "Select", label = "A selectInput with round corner", choices = 1:3)
)
server <- function(input, output, session){
}
# Run the app
shinyApp(ui, server)
示例 2(https://yuchenw.shinyapps.io/Corner_Input_Example2/)
# Load the packages
library(shiny)
library(shinydashboard)
# User Interface
ui <- dashboardPage(
header = dashboardHeader(title = ""),
sidebar = dashboardSidebar(
sidebarMenu(
menuItem(
text = "Example",
tabName = "tab1"
)
)
),
body = dashboardBody(
tabItems(
tabItem(
tabName = "tab1",
numericInput(inputId = "Number", label = "A numericInput with 90-degree corner", value = NA),
selectInput(inputId = "Select", label = "A selectInput with round corner", choices = 1:3)
)
)
)
)
server <- function(input, output, session){
}
# Run the app
shinyApp(ui, server)
解决方案
看起来它是引导程序的 CSS,它为角半径添加了 4px 的值。要删除它,请将其添加到您的 CSS 中:
.form-control {
border-radius: 0px;
}
或者,您可以将 4px 边框半径添加到您的其他站点:
.form-control {
border-radius: 4px;
}
推荐阅读
- clojure - 在Clojure中,为什么在定义函数时必须使用括号以及let的用例
- javascript - SVG 的 Chrome 剪辑路径错误的可能解决方法
- c# - 如何拦截 xamarin 表单的后退按钮?
- button - document.querySelector 返回字符串而不是数字
- windows - 哪个是 Windows 右键菜单中复制选项(选定文本)的注册表项路径?
- elixir - 在变更集中的多个字段上应用 Ecto validate_length
- firebase - 在 Firestore 中原子写入 2k+ 文档
- c# - 如何比较两个 IEnumerable
如果我不知道实际的对象类型,在 C# 中? - stored-procedures - PLSQL存储过程返回动态查询的结果
- java - Java Spring 应用的 TimeZone Brazil