【发布时间】:2017-01-11 06:30:15
【问题描述】:
我有以下页面 HERE,基本上你可以看到有一个 google 验证码,现在我需要 box-shadow 并且边框消失了,所以我应用了以下样式:
.rc-anchor-light { border: none !important;} .rc-anchor { box-shadow: none !important;}
上述方法不起作用,因为验证码是在 iframe 中加载的,所以在浏览了一段时间后,我想出了以下解决方案:
$('.g-recaptcha iframe').load( function() {
$('.g-recaptcha iframe').contents().find("head")
.append($("<style type='text/css'> .rc-anchor-light { border: none !important;} .rc-anchor { box-shadow: none !important;} </style>"));
});
这也不起作用,我认为在这种情况下这样做是错误的,因为 google iframe 已经在 <head> 样式元素中有一些自定义样式,所以上面恐怕可能会覆盖它。
那么我该如何修改谷歌验证码样式呢??
我想要的只是边框和阴影消失了。
【问题讨论】: