Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/34.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 当光标悬停在按钮上时,我想更改Pardot中的提交颜色_Html_Css_Pardot - Fatal编程技术网

Html 当光标悬停在按钮上时,我想更改Pardot中的提交颜色

Html 当光标悬停在按钮上时,我想更改Pardot中的提交颜色,html,css,pardot,Html,Css,Pardot,当光标悬停在按钮上时,我试图更改表单提交按钮的颜色,但我不确定代码为什么不起作用 我尝试了不同版本的代码,包括: form.form p.submit输入a:悬停{ 背景色:E8E8E8 <style type="text/css"> form.form input.text, form.form textarea.standard, form.form select, form.form input.date { background-color:#FFFFFF;

当光标悬停在按钮上时,我试图更改表单提交按钮的颜色,但我不确定代码为什么不起作用

我尝试了不同版本的代码,包括:

form.form p.submit输入a:悬停{ 背景色:E8E8E8

<style type="text/css"> 
form.form input.text, form.form textarea.standard, form.form select, form.form input.date { 
   background-color:#FFFFFF;
   border:solid 1px #00BCF1;
   font-size:16px;
   color:#000000;
   width:550px;
   -moz-border-radius:px;
   -webkit-border-radius:px;
   border-radius:15px;
   padding-top:5px;
   padding-bottom:5px;
   padding-left:5px;
   padding-right:5px;
}
form.form p label {
   font-size:14px;
   color:#FFFFFF;
   font-weight:normal;
   padding-top:15px;
   padding-bottom:5px;
}
form.form p.submit input {
   background-color:#B2D235;
   border:solid 1px #00BCF1;
   font-size:16px;
   color:#003c71;
   font-weight:bold;
   padding-top:15px;
   padding-bottom:15px;
   padding-right:25px;
   padding-left:25px;
   -moz-border-radius:0px;
   -webkit-border-radius:0px;
   border-radius:30px;

}

form.form p.submit input a:hover {
    background-color:E8E8E8;
}
form.form p.submit {
   margin-top:40px;
   margin-bottom:0px;
   text-align:left;
}
form.form p.required label, form.form span.required label {
    background:none !important; 
    font-weight:bold;
}
form.form p.required label.field-label:after {
    content:"*"; 
    color: #FFFFFF; 
}

 </style>
和form.form p.submit输入:悬停{ 背景色:E8E8E8

<style type="text/css"> 
form.form input.text, form.form textarea.standard, form.form select, form.form input.date { 
   background-color:#FFFFFF;
   border:solid 1px #00BCF1;
   font-size:16px;
   color:#000000;
   width:550px;
   -moz-border-radius:px;
   -webkit-border-radius:px;
   border-radius:15px;
   padding-top:5px;
   padding-bottom:5px;
   padding-left:5px;
   padding-right:5px;
}
form.form p label {
   font-size:14px;
   color:#FFFFFF;
   font-weight:normal;
   padding-top:15px;
   padding-bottom:5px;
}
form.form p.submit input {
   background-color:#B2D235;
   border:solid 1px #00BCF1;
   font-size:16px;
   color:#003c71;
   font-weight:bold;
   padding-top:15px;
   padding-bottom:15px;
   padding-right:25px;
   padding-left:25px;
   -moz-border-radius:0px;
   -webkit-border-radius:0px;
   border-radius:30px;

}

form.form p.submit input a:hover {
    background-color:E8E8E8;
}
form.form p.submit {
   margin-top:40px;
   margin-bottom:0px;
   text-align:left;
}
form.form p.required label, form.form span.required label {
    background:none !important; 
    font-weight:bold;
}
form.form p.required label.field-label:after {
    content:"*"; 
    color: #FFFFFF; 
}

 </style>
我想让按钮改变颜色,但我似乎无法做到这一点。

你可以试试这个


<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
.btn {
  background-color: #ddd;
  border: none;
  color: black;
  padding: 16px 32px;
  text-align: center;
  font-size: 16px;
  margin: 4px 2px;
  transition: 0.3s;
}

.btn:hover {
  background-color: #3e8e41;
  color: white;
}
</style>
</head>
<body>

<h2>Fading Buttons - "Fade in Effect"</h2>

<button class="btn">Hover Over Me</button>

</body>
</html>


我马上注意到的一件事是,您没有在十六进制代码前面加a。 所以它应该看起来像这样

form.form p.submit input a:hover {
    background-color:#E8E8E8
}

除此之外,查看关联的HTML可能会有帮助,因为您在颜色代码color:E8E8E8之前缺少了

form.form p.submit输入a:hover{背景色:E8E8E8

<style type="text/css"> 
form.form input.text, form.form textarea.standard, form.form select, form.form input.date { 
   background-color:#FFFFFF;
   border:solid 1px #00BCF1;
   font-size:16px;
   color:#000000;
   width:550px;
   -moz-border-radius:px;
   -webkit-border-radius:px;
   border-radius:15px;
   padding-top:5px;
   padding-bottom:5px;
   padding-left:5px;
   padding-right:5px;
}
form.form p label {
   font-size:14px;
   color:#FFFFFF;
   font-weight:normal;
   padding-top:15px;
   padding-bottom:5px;
}
form.form p.submit input {
   background-color:#B2D235;
   border:solid 1px #00BCF1;
   font-size:16px;
   color:#003c71;
   font-weight:bold;
   padding-top:15px;
   padding-bottom:15px;
   padding-right:25px;
   padding-left:25px;
   -moz-border-radius:0px;
   -webkit-border-radius:0px;
   border-radius:30px;

}

form.form p.submit input a:hover {
    background-color:E8E8E8;
}
form.form p.submit {
   margin-top:40px;
   margin-bottom:0px;
   text-align:left;
}
form.form p.required label, form.form span.required label {
    background:none !important; 
    font-weight:bold;
}
form.form p.required label.field-label:after {
    content:"*"; 
    color: #FFFFFF; 
}

 </style>

您可以在以下链接中找到答案:

我发现您的颜色不正确a:悬停。您需要包括