Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/384.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
Javascript “提交”按钮不显示为标准网站_Javascript_Css_Forms_Button - Fatal编程技术网

Javascript “提交”按钮不显示为标准网站

Javascript “提交”按钮不显示为标准网站,javascript,css,forms,button,Javascript,Css,Forms,Button,我正在开发一个web应用程序,但“提交”按钮并没有显示为标准web,比如当你将鼠标移到它上面时,它会变成蓝色,显示的只是灰色背景,没有边框。这在所有浏览器中都会发生,很抱歉,我没有足够的声誉来放置图片,而且当你单击时,效果也不会出现“接收器”,它还没有css,有人能帮我吗,或者知道为什么 <input type="submit" name="send" value="send"/> *{ margin:0;

我正在开发一个web应用程序,但“提交”按钮并没有显示为标准web,比如当你将鼠标移到它上面时,它会变成蓝色,显示的只是灰色背景,没有边框。这在所有浏览器中都会发生,很抱歉,我没有足够的声誉来放置图片,而且当你单击时,效果也不会出现“接收器”,它还没有css,有人能帮我吗,或者知道为什么

<input type="submit" name="send" value="send"/>

*{                      margin:0;
                    padding:0;
                    text-decoration:none;
                    border:0px;
                    font-style:normal;  
                    outline:none;
                    list-style-type: none;}

body    {                   width:970px;
                    margin:0 auto;
                    font-family:arial;
                    background:#fdfdfd;}

*{边距:0;
填充:0;
文字装饰:无;
边界:0px;
字体风格:普通;
大纲:无;
列表样式类型:无;}
主体{宽度:970px;
保证金:0自动;
字体系列:arial;
背景:#fdfdfd;}
我使用的标题是

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head><title>Painel Administrativo:</title>
<meta name="description" content="O Compareai é uma ferramenta para vôçe"/>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

<meta http-equiv="Content-Language" content="pt-br" />
<link rel="stylesheet" media="all" type="text/css" href="css/dropdown.css" />

<noscript>
<link rel="stylesheet" href="css/painel_administrativo.css" type="text/css"/>
</noscript>
 <script type='text/javascript' src='js/pa.js'></script>



</head>

佩内尔行政:

已尝试取消重置,但问题仍然存在

根据我对您问题的理解,您的问题归结为CSS特定规则,请查看以获取更多信息

基本上,您的
input
元素继承了父样式的属性,因此您需要为
input
元素创建CSS,使其外观和行为符合您的要求

*{                  margin:0;
                    padding:0;
                    text-decoration:none;
                    border:0px;
                    font-style:normal;  
                    outline:none;
                    list-style-type: none;}

*适用于一切事物。因此,您正在将边框设置为0。您需要更具体地使用css。

您的问题在于您正在使用的
*
重置。通过声明
边框:0px在其中,您正在清除输入上的那些样式。在这里查看:使用
边框:0px属性从
*
选择器中删除。

我尝试了您的代码,结果如下:

Opera:  not normal submit button, gray bg with no borders
FF:     not normal submit button, gray bg with no borders
IE:     normal submit button
Chrome: not normal submit button, gray bg with no borders
Safari: not normal submit button, gray bg with no borders
如果希望所有浏览器都呈现为无边框和灰色背景,请创建一个类,而不是使用“*”

例:

然后

 <input type="submit" name="send" value="send" class="mybuttons" />


如果希望它看起来像一个普通的提交按钮,请不要在css代码中使用“*{}”。

正如其他答案中所述,问题是由以下原因引起的:

*{                      margin:0;
                    padding:0;
                    text-decoration:none;
                    border:0px;
                    font-style:normal;  
                    outline:none;
                    list-style-type: none;}
*
上的
border:0px
适用于所有内容,包括您的“提交按钮”,这就是您遇到此问题的原因

如果要使用CSS重置,请使用真实重置,而不是
*{..}


您能否提供更多信息,例如您的平台、浏览器和示例代码?听起来好像有一些CSS影响了你的按钮,而你却没有意识到。你需要发布你正在使用的系统、浏览器以及你的代码和CSS外观的信息——这里没有任何信息允许任何人帮助你。昨晚他也问了同样的问题。但他昨晚确实发布了代码/图片……没有继承权。选择器与元素匹配并应用于该元素。除
*
选择器外,该选择器适用于每个元素。这是一个快速重置,但会导致类似这样的问题。继承正在进行,因为他说“出现的只是一个没有边框的灰色背景”,无边框是在
*{}
CSS中指定的,他需要创建一个类并分配它,或者在CSS中指定
input
元素
*{                      margin:0;
                    padding:0;
                    text-decoration:none;
                    border:0px;
                    font-style:normal;  
                    outline:none;
                    list-style-type: none;}