IE和Edge中的Textarea边界

时间:2017-07-20 14:04:06

标签: css textarea

我有一个textarea风格和镀铬它看起来很好,平坦的边框一直到处,但在边缘和IE它的左侧和上侧有一个较暗的边框(如下图所示)。我假设这是某种阴影,怎么能删除? IE and Edge Border Issue

我用于文本框的CSS是......

.textarea-rounded {
    font-family: 'Inconsolata', monospace;
    overflow: hidden;
    margin-top: 5px;
    margin-bottom: 5px;
    padding-left: 10px;
    padding-right: 10px;
    background-color: #ecf0f1;;
    border-radius: 25px;
    height: 200px;
    width: 90%;
    font-size: 18pt;
    color: #95a5a6;
    transition: all 0.8s ease-in-out;
    -webkit-transition: all 0.8s ease-in-out;
    -moz-transition: all 0.8s ease-in-out;
    box-shadow: 0 0 5px rgba(81, 203, 238, 0);
    -webkit-box-shadow: 0 0 5px rgba(81, 203, 238, 0);
    -moz-box-shadow: 0 0 5px rgba(81, 203, 238, 0);
}

1 个答案:

答案 0 :(得分:1)

这是由于Edge的默认border-color。您可以为此明确设置border-color以使其具有相同的跨浏览器边框颜色。

.textarea-rounded {
  font-family: 'Inconsolata', monospace;
  overflow: hidden;
  margin-top: 5px;
  margin-bottom: 5px;
  padding-left: 10px;
  padding-right: 10px;
  background-color: #ecf0f1;
  border-radius: 25px;
  height: 200px;
  width: 90%;
  font-size: 18pt;
  color: #95a5a6;
  transition: all 0.8s ease-in-out;
  -webkit-transition: all 0.8s ease-in-out;
  -moz-transition: all 0.8s ease-in-out;
  box-shadow: 0 0 5px rgba(81, 203, 238, 0);
  -webkit-box-shadow: 0 0 5px rgba(81, 203, 238, 0);
  -moz-box-shadow: 0 0 5px rgba(81, 203, 238, 0);
  border-color: #808080; /* new */
}
<textarea class="textarea-rounded"></textarea>