如何更改自定义谷歌搜索文本框的宽度? [英] How to change width of custom google search textbox?

查看:128
本文介绍了如何更改自定义谷歌搜索文本框的宽度?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何更改自定义Google搜索文本框的宽度。这是我到目前为止的代码



How do I change the width of a custom google seach textbox. Here is my code so far

<script type= "text/javascript">
         (function () {
             var cx = ???????????????????????????????????????????;;
             var gcse = document.createElement('script');
             gcse.type = 'text/javascript';
             gcse.async = true;
             gcse.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') +
        '//www.google.com/cse/cse.js?cx=' + cx;
             var s = document.getElementsByTagName('script')[0];
             s.parentNode.insertBefore(gcse, s);
         })();
</script>

推荐答案

您只需在文本框周围创建一个带有类的div。
You just create a div with a class around the textbox.


< a href =http://www.poketors.com/2011/09/how-to-customize-google-custom-search.html> http://www.poketors.com/2011/09/how-to -customize-google-custom-search.html [ ^ ]

http://www.stylifyyourblog.com/2011/07/customize-google-custom-search-box.html [ ^ ]



-KR
http://www.poketors.com/2011/09/how-to-customize-google-custom-search.html[^]
http://www.stylifyyourblog.com/2011/07/customize-google-custom-search-box.html[^]

-KR


这篇关于如何更改自定义谷歌搜索文本框的宽度?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆