Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/73.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 无法设置表单提交按钮的样式_Html_Css_Forms - Fatal编程技术网

Html 无法设置表单提交按钮的样式

Html 无法设置表单提交按钮的样式,html,css,forms,Html,Css,Forms,编辑:已解决,请参阅注释 我读过一些关于表单中提交按钮样式的帖子,但它似乎只对我起了部分作用。我可以更改边框,但不能更改背景颜色或字体设置。有人能告诉我我的代码有什么问题吗?我对表格不熟悉,所以我本可以只睡几张床。我试过背景,背景色,十六进制值。。。我只是被难住了 #submitButton { color: black; background: #cac9c9; border: 4px solid blue; } Css 我觉得不错你在测试什么浏览器?IE6?使用诸如firebug之类的调试

编辑:已解决,请参阅注释

我读过一些关于表单中提交按钮样式的帖子,但它似乎只对我起了部分作用。我可以更改边框,但不能更改背景颜色或字体设置。有人能告诉我我的代码有什么问题吗?我对表格不熟悉,所以我本可以只睡几张床。我试过背景,背景色,十六进制值。。。我只是被难住了

#submitButton {
color: black;
background: #cac9c9;
border: 4px solid blue;
}

Css
我觉得不错你在测试什么浏览器?IE6?使用诸如firebug之类的调试工具来检查有问题的元素。它会告诉你样式元素的来源,并帮助你找到错误。我使用的是最新版本的Chrome。虽然我一直在运行我的调试器,但我又看了一眼,并真正弄明白了!我在css中有另一个输入选择器,它也影响了这个选择器。简言之,一个背景图像在这个输入中掩盖了一些东西。感谢您的快速回复!!我建议你看看!重要属性您可以在一行中写入所有边界半径垃圾,如边界半径:20px;就是这样,我不知道是用厂商的前缀来搜索还是非常无知……我解决了!我在css中有另一个输入选择器也影响了这个!谢谢你!看看吧,不管它的供应商前缀或其他什么废话只是想帮忙
<form action="#" method="post">
    <input type="text" value="user@domain.com" />
    <div class="clear"></div>
    <hr />
    <div id="checkboxContainer">
        <span>Select the newsletters you'd like to receive</span>
        <input type="checkbox" name="travel" value="Getaways" />
        <label>Destinations &#38; Getaways</label>
        <br />
        <input type="checkbox" name="travel" value="Tips" />
        <label>Weekly Travel Tips</label>
    </div>
    <input id="submitButton" type="submit" value="SIGN UP" />
</form>
.classname {
    -moz-box-shadow:inset 0px 1px 0px 0px #bee2f9;
    -webkit-box-shadow:inset 0px 1px 0px 0px #bee2f9;
    box-shadow:inset 0px 1px 0px 0px #bee2f9;
    background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #63b8ee), color-stop(1, #468ccf) );
    background:-moz-linear-gradient( center top, #63b8ee 5%, #468ccf 100% );
    filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#63b8ee', endColorstr='#468ccf');
    background-color:#63b8ee;
    -webkit-border-top-left-radius:20px;
    -moz-border-radius-topleft:20px;
    border-top-left-radius:20px;
    -webkit-border-top-right-radius:20px;
    -moz-border-radius-topright:20px;
    border-top-right-radius:20px;
    -webkit-border-bottom-right-radius:20px;
    -moz-border-radius-bottomright:20px;
    border-bottom-right-radius:20px;
    -webkit-border-bottom-left-radius:20px;
    -moz-border-radius-bottomleft:20px;
    border-bottom-left-radius:20px;
    text-indent:0;
    border:1px solid #3866a3;
    display:inline-block;
    color:#14396a;
    font-family:Arial;
    font-size:15px;
    font-weight:bold;
    font-style:normal;
    height:50px;
    line-height:50px;
    width:86px;
    text-decoration:none;
    text-align:center;
    text-shadow:1px 1px 0px #7cacde;
}
.classname:hover {
    background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #468ccf), color-stop(1, #63b8ee) );
    background:-moz-linear-gradient( center top, #468ccf 5%, #63b8ee 100% );
    filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#468ccf', endColorstr='#63b8ee');
    background-color:#468ccf;
}.classname:active {
    position:relative;
    top:1px;
}