虽然这可能非常简单,但我无法弄清楚如何使用我的网站CSS自定义Google自定义搜索栏API。我曾尝试应用几个预定义的css类与宽度限制div
,但它似乎搜索栏它仍然与样式和iframe
看。如何使用自己的CSS自定义Google自定义搜索栏API
这是我的代码:我如何应用CSS给它
<html>
<head>
<div width="100%" id="cse" style="width: 100%;">Loading</div>
<script src="http://www.google.com/jsapi" type="text/javascript">
</script>
<script type="text/javascript">
google.load('search', '1', {language: 'en', style: google.loader.themes.V2_DEFAULT});
google.setOnLoadCallback(function() {
var customSearchOptions = {};
var customSearchControl = new google.search.CustomSearchControl('009437919812836441502:rka9ujkwvwe', customSearchOptions);
customSearchControl.setResultSetSize(google.search.Search.FILTERED_CSE_RESULTSET);
customSearchControl.draw('cse');
}, true);
</script>
</head>
</html>
或者是有可能呢?
我相信这是不可能的。我尝试了一次,然后这是不可能的,但从那时起事情可能发生了变化。 – GolezTrol