【问题标题】:set the width of a kendo numeric text box with tag helpers使用标签助手设置剑道数字文本框的宽度
【发布时间】:2018-12-30 20:03:02
【问题描述】:

标题差不多,我搜索了文档,我只能找到:

https://docs.telerik.com/aspnet-core/tag-helpers/editors/numerictextbox/overview

根本没有解决这个问题。

这是我当前的代码行:

    <kendo-numerictextbox name="currency" id="txtCheckNumber"  format="#" min="0" enable="true" max="9999999999" spinners="false" value="10001" > </kendo-numerictextbox>

我尝试了明显的 width="100px" 和 width="100" 没有成功

【问题讨论】:

  • 我也找不到任何东西。对于 kendo-dropdownlist,您可以使用 style (style="width: 200px;") 但 numerictextbox 似乎不支持。

标签: telerik tag-helpers


【解决方案1】:

我能弄清楚如何设置宽度的唯一方法是覆盖包装器跨度和输入上的 Kendo 样式。

<style type="text/css">
    .k-widget.k-numerictextbox {
        width: 100px !important;
    }
    .k-numeric-wrap.k-state-default {
        width: 100px !important;
    }
    .k-numeric-wrap input {
        width: 100px !important;
    }
</style>

【讨论】:

  • 这样就行了!
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2013-05-27
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2011-05-05
相关资源
最近更新 更多