背景颜色在窗体? [英] Background color in forms?
本文介绍了背景颜色在窗体?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想设置一个背景颜色到html表单标签,但它不工作?我认为这是一个简单的任务!帮助preciated!谢谢!
I'm trying to set a background color to the html form tag but it doesn't work?! I thought it was a simple task! Help preciated! Thanks!
#form{
background-color: #000;
padding: 10px;
}
推荐答案
你的形式的代码?也许有一个类,你使用它与你的#form声明冲突。
can we just see the html code of your form? maybe there's a class you're using that conflicts with your #form declaration.
也,如果你想表单块有背景, div和背景它。
also, if you want the "form block" to have a background, put it inside a div and background it.
如果你想给表单输入一个背景,你应该给输入对象一个样式
if you want to give a background to the form inputs, you should give a style to the input objects
#form input{
background-color: #000;
}
#form input .submit{ ... }
#form label { ... }
等等
这篇关于背景颜色在窗体?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文