css - textarea 没有收到后代 CSS 属性

标签 css xhtml textarea background-color

<分区>

我有 CSS 设置:

.missing textarea {background-color: #fffcc !important;}

html 看起来像这样:

<div id="label-add" class="jscript xtra-box sub-question missing">
<p>Additional Health Care Instructions</p>
<textarea id="addrule" name="addrule"></textarea>
</div>

它使用 XHTML 1.0 过渡 DOCTYPE。
而且,我在 FF 和 Chrome 中试过,但我没有得到文本区域的背景颜色;它甚至没有在调试控制台中显示为被覆盖...

最佳答案

颜色缺少一个字符。 “#fffcc”还需要一个字符。

关于css - textarea 没有收到后代 CSS 属性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2052168/

上一篇:CSS div 类选择

下一篇:javascript - CSS - js 渲染链接无用

相关文章:

android - 如何在 Android webview 中打开一个 xhtml 文件

css - 哪个边框半径属性适用于 IE9?

php - 检查文本区域中的第一个单词(PHP)

html - 为什么有时页面内的 css 不能正常工作,就像这种情况?

html - Fixed topcontainer 使一切固定

javascript - famo.us Firefox 设置 z-index 不起作用

html - 为什么主流浏览器不支持输入类型 ="file"的 HTML ACCEPT 属性?

javascript - 如何计算 contenteditable 元素偏移处的 css 样式?

javascript - 无法动态设置文本区域的高度

html - 当我将图像添加到容器中时,我无法使其响应