如何在Bootstrap中为文本区域字段设置背景颜色

8

需要在Bootstrap中给我的文本区域字段添加背景颜色。 这是文本区域字段。

<div class="form-group">
    <div class="col-xs-12">
     <textarea class="form-control" id="exampleTextarea" rows="6"  placeholder="Message"></textarea>
    </div>
   </div>
5个回答

11

添加这个类。

textarea#exampleTextarea {
    background: gray;
}

或者您也可以使用这个。

#exampleTextarea {
    background: gray;
}

通过添加属性border: 0px;,如果你想看到效果,那么首先添加border: 5px solid black;,然后移除5px并设置为0px,这样你就会有一个想法。 - Emipro Technologies Pvt. Ltd.

1
你可以尝试它。
textarea#exampleTextarea{ 
    background-color:gray !important;
}

1

0

试试这个:

textarea.form-control {
color: #63AEEB
}

0

你可以使用ID

#email { 
  background-color: #E2E4E9 !important;
}

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接