我爲Bootstrap 3設計了恢復程序。現在我需要在100%
中爲響應式主題顯示恢復圖像。如何做出響應式圖像恢復
HTML:
<div class="form-group">
<div class="captcha">
<div id="recaptcha_image"></div>
</div>
</div>
<div class="form-group">
<div class="recaptcha_only_if_image">Enter the words above</div>
<div class="recaptcha_only_if_audio">Enter the numbers you hear</div>
<div class="input-group">
<input type="text" id="recaptcha_response_field" name="recaptcha_response_field" class="form-control input-lg" /> <a class="btn btn-default input-group-addon" href="javascript:Recaptcha.reload()"><span class="icon-refresh"></span></a>
<a class="btn btn-default input-group-addon recaptcha_only_if_image" href="javascript:Recaptcha.switch_type('audio')"><span class="icon-volume-up"></span></a>
<a class="btn btn-default input-group-addon recaptcha_only_if_audio" href="javascript:Recaptcha.switch_type('image')"><span class="icon-picture"></span></a>
</div>
<script>
var RecaptchaOptions = {
theme: 'custom',
custom_theme_widget: 'recaptcha_widget'
};
</script>
<script type="text/javascript" src="http://www.google.com/recaptcha/api/challenge?k=6LcrK9cSAAAAALEcjG9gTRPbeA0yAVsKd8sBpFpR"></script>
<noscript>
<iframe src="http://www.google.com/recaptcha/api/noscript?k=6LcrK9cSAAAAALEcjG9gTRPbeA0yAVsKd8sBpFpR" 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>
</div>
CSS:
#recaptcha_image img {
width:100%
}
如何調整圖像的reCAPTCHA的響應式設計?
演示:FIDDLE
替代方法:[不](http://www.karlgroves.com/2012/04/03/captcha-less-security/)因爲](http://www.karlgroves.com/2013/02/09/list-of-resources-breaking-captcha/),卡爾格羅夫斯的禮貌比我的評論更有建設性,我希望^^ – FelipeAls 2014-10-09 07:41:33
好文檔!你是對的。我認爲更好的設計,我把圖像recaptcha在'div'的中心。 – 2014-10-09 07:44:54