【问题标题】:How to hide disabled input underline style如何隐藏禁用的输入下划线样式
【发布时间】:2021-01-27 01:38:44
【问题描述】:

在为paper-inputdisabled 等HTML 元素设置样式时,会添加点下划线样式。

我可以编辑禁用的样式,例如

paper-input {
  --paper-input-container-disabled: {
    color: black;
    opacity: 1;
    text-decoration: none;
  };
}

但是设置text-decoration并不会隐藏这种风格。

如何设置 CSS 以隐藏此 disabled 下划线样式?

【问题讨论】:

    标签: css input polymer disabled-input text-decorations


    【解决方案1】:

    您可以添加 display: none 属性来删除下划线。

     <style is="custom-style">
          :root {
            --paper-input-container-underline: {
              display: none;
            };
          }
        </style>
    

    如果对您不起作用,请尝试删除根目录。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-12-08
      • 1970-01-01
      • 1970-01-01
      • 2013-06-29
      • 1970-01-01
      • 2012-02-22
      • 1970-01-01
      相关资源
      最近更新 更多