我有google re-Captcha的问题。它很少发生,但有时候图像显示不正确。它错过了一些部分。这是图像:
这是我的Html:
<div id="recaptcha_widget" style="display:none">
<div id="recaptcha_image"></div>
<div class="recaptcha_only_if_incorrect_sol" style="color:red">Error: Invalid code, please try again</div>
<div class="recaptcha_only_if_image">Please enter the code from the image above:</div>
<input type="text" id="recaptcha_response_field" name="recaptcha_response_field" />
<div><a href="javascript:Recaptcha.reload()"><img id = "restart-button" src="/images/restart.png" width = "20px" height = "20px"></a></div>
</div>
我只将此css应用于它:
#recaptcha_widget{
margin-top: 10px;
width:508px;
}
.recaptcha_only_if_image{
margin-left: 3px;
margin-bottom:7px;
line-height: 20px;
color: #747474;
font-size:13px;
}
#recaptcha_response_field{
width: 233px;
height: 21px;
padding-left: 7px;
border: 1px solid #dadada;
border-radius: 2px;
color: #4d4d4d;
float:left;
}
#recaptcha_response_field:focus{
outline:rgb(184, 167, 130) auto 2px;
}
#restart-button{
margin-top: 2px;
margin-left: 10px;
}
#recaptcha_image{
margin-bottom: 10px;
}
#recaptcha_challenge_image{
border: solid 1px #e2e2e2;
border-radius: 5px;
}
我没有调整图片大小,它是300x57像素。
提前致谢:)
答案 0 :(得分:0)
尝试给Captcha div赋予宽度。
Width: ;