Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/41.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
CSS按钮不呈现为按钮_Css - Fatal编程技术网

CSS按钮不呈现为按钮

CSS按钮不呈现为按钮,css,Css,我有这个密码 .sidebar-button { color:#ffffff; background-color:#ff9933; background-repeat:repeat-x;background-image:-khtml-gradient(linear, left top, left bottom, from(#ffae5e), to(#ff9933)); background-image:-moz-linear-gradient(top, #ffae

我有这个密码

.sidebar-button
{
    color:#ffffff;
    background-color:#ff9933;
    background-repeat:repeat-x;background-image:-khtml-gradient(linear, left top, left bottom, from(#ffae5e), to(#ff9933));
    background-image:-moz-linear-gradient(top, #ffae5e, #ff9933);background-image:-ms-linear-gradient(top, #ffae5e, #ff9933);
    background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #ffae5e), color-stop(100%, #ff9933));
    background-image:-webkit-linear-gradient(top, #ffae5e, #ff9933);background-image:-o-linear-gradient(top, #ffae5e, #ff9933);
    background-image:linear-gradient(top, #ffae5e, #ff9933);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffae5e', endColorstr='#ff9933', GradientType=0);
    text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);border-color:#ff9933 #ff9933 #ff8000;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
}
但它呈现为橙色背景的文本。知道它为什么不能正确渲染吗?我错过什么了吗

height: 30px;
width: 100px;
您需要设置按钮的宽度和高度:

您需要设置按钮的宽度和高度:

一旦开始设置样式,就必须完全设置样式。它不继承基本按钮属性。您还可以使用类似的方法快速创建更详细的按钮。

一旦开始设置样式,就必须完全设置样式。它不继承基本按钮属性。您还可以使用类似的方法快速创建更详细的按钮。

如果您在这方面真的是新手,我更新了JSFIDLE以便您可以看到以文本为中心的按钮:如果您在这方面真的是新手,我更新了JSFIDLE以便您可以看到以文本为中心的按钮: