代码之家  ›  专栏  ›  技术社区  ›  ClarkeyBoy

Google Chrome>文本框>激活时的黄色边框…?

  •  43
  • ClarkeyBoy  · 技术社区  · 14 年前

    我今天修改了一个表单,并在chrome中进行了测试。我注意到,在选择边框为0或无的文本框时,它仍然在其周围放置黄色边框。有人知道如何摆脱这个边界吗?我通常不会那么麻烦,但我使用的配色方案看起来真的很糟糕。

    事先谢谢。

    当做,

    理查德

    我试过用!同样重要的是,如果有其他东西在CSS中将边框设置为黄色。

    2 回复  |  直到 10 年前
        1
  •  75
  •   Tim M.    10 年前



    outline: none;

    input[type="text"], input[type="password"] { outline: none; }
    

    a website dedicated

    https://developer.mozilla.org/en-US/docs/CSS/outline

    http://jsfiddle.net/G28Gd/2/

    INPUT[type="text"]:focus,
    INPUT[type="number"]:focus,
    INPUT[type="email"]:focus,
    INPUT[type="search"]:focus,
    INPUT[type="password"]:focus,
    INPUT[type="range"]:focus
    {
        outline: 1px solid #0033dd;    
    }​
    

    try it

    Replaced elements <input type="range">

    enter image description here


        2
  •  7
  •   Core Xii    14 年前

    outline