【问题标题】:font and color change not applying only to datepicker字体和颜色更改不仅适用于 datepicker
【发布时间】:2015-06-09 06:52:43
【问题描述】:

我创建了一个使用 angularjs 获取日历的应用程序,我使用了 angular-bootstrap-datetimepicker 插件来实现这一点。该应用程序运行良好,但问题是我希望日历的字体大小为font-size: 105%,当我将以下样式应用于整页时。

 *, th, tr {
  font-size: 105% !important;
}

我如何更改日历的默认蓝色 我的工作演示显示在 JSFiddle

【问题讨论】:

    标签: javascript css angularjs calendar bootstrap-datetimepicker


    【解决方案1】:

    在日历表上应用 css 而不是所有元素 替换

    *, th, tr {
      /* text-rendering: optimizeLegibility; */
      font-size: 105% !important;
    }
    

    .table-striped {
      /* text-rendering: optimizeLegibility; */
      font-size: 205% !important;
    }
    

    【讨论】:

    • 你想换什么颜色??
    • @AlexMan 只需在上面提到的 css 中给颜色,即 .table-striped { /* text-rendering: optimizeLegibility; */ 字体大小:205% !important;颜色:#1ab394 !重要; }
    • 该颜色将应用于选择而不是日期标签
    • 添加这个 css td.active.active{ color:#1ab394 !important; }
    • @AlexMan 您希望更改字体颜色或背景颜色。对于背景颜色,如果它有效,请在页面的最后添加下面的 CSS(不是 100% 确定) td.active.active{ background-color:#1ab394 !important;背景图像:无!重要; } td.active.disabled:hover { 背景颜色: #1ab394 !important; }
    【解决方案2】:

    尝试通过日期选择器本身来缩小范围:

    #datepicker > *, th, tr {
      font-size: 105% !important;
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2020-01-15
      • 1970-01-01
      • 2013-10-20
      • 1970-01-01
      • 1970-01-01
      • 2016-09-06
      • 2013-09-24
      相关资源
      最近更新 更多