Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/79.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_Wordpress_Button - Fatal编程技术网

在HTML标记样式中;{…}{:活动…}不';不行?

在HTML标记样式中;{…}{:活动…}不';不行?,html,css,wordpress,button,Html,Css,Wordpress,Button,我卡住了,因为我尝试了这么多不同的组合,我不知道为什么这不起作用 Wordpress 吴哥商业 结账 从(提交)返回按钮 表单提交按钮标记带有style=“{}:active{}” 我没有头,我可以存储css,只是一个模板的形式。 Submit已经在main style.css中预先设置了样式。 我只想设计两个按钮“付款”和“退回”,而不是所有的按钮。 我把完整的css放在按钮的html中,这是有效的,除了:active这不起作用 <table width="100%"><tr

我卡住了,因为我尝试了这么多不同的组合,我不知道为什么这不起作用

Wordpress 吴哥商业 结账 从(提交)返回按钮 表单提交按钮标记带有
style=“{}:active{}”

我没有头,我可以存储css,只是一个模板的形式。 Submit已经在main style.css中预先设置了样式。 我只想设计两个按钮“付款”和“退回”,而不是所有的按钮。 我把完整的css放在按钮的html中,这是有效的,除了:active这不起作用

<table width="100%"><tr><td width="23%"><input type="submit" class="button alt" name="woocommerce_checkout_update_totals" id="place_order" value="<?php _e( 'back', Woocommerce_German_Market::get_textdomain() ) ?>" style="{position: relative;color: rgba(255,255,255,1);text-decoration: none;background-color: rgb(248, 1, 8);font-weight: bold;display: block;padding: 18px;-webkit-border-radius: 8px;-moz-border-radius: 8px;border-radius: 8px;-webkit-box-shadow: 0px 9px 0px rgb(179, 6, 1), 0px 9px 25px rgba(0,0,0,.7);-moz-box-shadow: 0px 9px 0px rgb(179, 6, 1), 0px 9px 25px rgba(0,0,0,.7);box-shadow: 0px 9px 0px rgb(179, 6, 1), 0px 9px 25px rgba(0,0,0,.7);margin: 2px 0px 25px 0px;text-align: center;-webkit-transition: all .1s ease;-moz-transition: all .1s ease;-ms-transition: all .1s ease;-o-transition: all .1s ease;transition: all .1s ease; font-size: 1.387em;} :active {-webkit-box-shadow: 0px 3px 0px rgb(179, 6, 1), 0px 3px 6px rgba(0,0,0,.9);-moz-box-shadow: 0px 3px 0px rgb(179, 6, 1), 0px 3px 6px rgba(0,0,0,.9);box-shadow:0px 3px 0px rgb(179, 6, 1), 0px 3px 6px rgba(0,0,0,.9);position: relative;top: 6px}" /></td>
<td width="77%"><div align="center">something maybe a button</div></td>
</tr>

样式属性应仅包含CSS声明。它不应该包括样式表中围绕它们的
{}


无法在样式属性中包含选择器,因此需要使用常规样式表。

样式属性中的语法不正确

使用
style=“property:value;…”
而不是
style=“{}”

因此,在您的情况下,它将是:

<div style="width:50px; height:50px; background:blue;"></div>
在标题中添加

<style type='text/css'>
input :active {
-webkit-box-shadow: 0px 3px 0px rgb(179, 6, 1);
//... what ever you have put for active 
}
</style>

输入:活动{
-webkit盒阴影:0px 3px 0px rgb(179,6,1);
//…你把什么放进了活动状态
}

试试。

好的,但是我如何实现:active以可视化按下的按钮?您使用样式表(通过
)而不是样式属性。在
中编辑按钮样式。按钮{color:red;}。按钮:active{color:green;}
好的,但我只想设置一个按钮的样式。输入和提交已设置样式。我想覆盖这一点,特别是对于签出模板中的签出按钮。我没有头标签,只有表单。类名我只是概括了它:)谢谢Anobik表单你的帮助好的,但我只想设计一个按钮。输入和提交已设置样式。我想覆盖这一点,特别是对于签出模板中的签出按钮。我没有头牌,只有头牌form@Marco-SiegfriedPenthin然后您需要更具体的样式,请参阅我的更新。我用
。按钮来代替。嘿,乔希,非常感谢你!!工作!!:-)@马可·齐格弗里德本辛很高兴这有帮助。
<style type='text/css'>
input :active {
-webkit-box-shadow: 0px 3px 0px rgb(179, 6, 1);
//... what ever you have put for active 
}
</style>