使用带有验证码的Recaptcha的"clean“主题,输入验证码的输入不会出现在(#recaptcha_table >tbody:nth- IE9< (1)> tr:nth-child(2))中,但会再次显示。如何正确显示更改css的输入?
发布于 2013-07-10 20:59:30
我已经检查过了,从我这一端看,reCAPTCHA不能在IE8中工作。
解决这个问题的最简单的方法是创建自己的reCAPTCHA风格。因此,使用reCAPTCHA中的“干净”模板并不是必须的。
这段代码将显示你的reCAPTCHA (我做了一个类似于“reCAPTCHA”的样式):
检查JSBin:http://jsbin.com/utubal/1/edit或检查以下内容:
<style>
#recaptcha_widget {
width: 400px;
padding: 5px;
border: 1px solid #CCCCCC;
font-family: Calibri, Ubuntu Light, Arial;
font-size: 12px;
}
#recaptcha_widget a {
text-decoration: none;
color: #2D7FC0;
font-weight: bold;
}
#recaptcha_image {
border: 1px solid #CCCCCC;
}
#recaptcha_response_field {
width: 300px;
}
</style>
<script type="text/javascript">
var RecaptchaOptions = {
theme : 'custom',
custom_theme_widget: 'recaptcha_widget'
};
</script>
<div id="recaptcha_widget" style="display:none">
<div style="float:left; width: 80%;">
<div id="recaptcha_image"></div>
<div class="recaptcha_only_if_incorrect_sol" style="color:red">Incorrect please try again</div>
<span class="recaptcha_only_if_image">Enter the words above:</span>
<span class="recaptcha_only_if_audio">Enter the numbers you hear:</span>
<input type="text" id="recaptcha_response_field" name="recaptcha_response_field" style="border: 1px solid #cccccc;"/>
</div>
<div style="float: left; margin-left: 10px;">
<div><a href="javascript:Recaptcha.reload()">REFRESH</a></div>
<div class="recaptcha_only_if_image"><a href="javascript:Recaptcha.switch_type('audio')">AUDIO</a></div>
<div class="recaptcha_only_if_audio"><a href="javascript:Recaptcha.switch_type('image')">IMAGE</a></div>
<div><a href="javascript:Recaptcha.showhelp()">Help</a></div>
</div>
<div style="clear: both;"></div>
</div>
<script type="text/javascript"
src="http://www.google.com/recaptcha/api/challenge?k=YOUR_PUBLIC_KEY">
</script>
<noscript>
<iframe src="http://www.google.com/recaptcha/api/noscript?k=YOUR_PUBLIC_KEY"
height="300" width="500" frameborder="0"></iframe><br>
<textarea name="recaptcha_challenge_field" rows="3" cols="40">
</textarea>
<input type="hidden" name="recaptcha_response_field"
value="manual_challenge">
</noscript>我希望这能对你有所帮助!
附注:请记住使用您的密钥覆盖YOUR_PUBLIC_KEY (两个位置)。
https://stackoverflow.com/questions/17569776
复制相似问题