在网上找到这样一段代码:<input type="button" value="测试 文字"> 我给它定义了一个class,“buttonstyle”,样式如下
它在IE8、火狐、谷歌下面的效果是OK的,截图如下:
在IE6、IE7下面的效果图如下:
经调试,只要给buttonstyle加一个padding就行了,只要调一下左右的值就OK,我这里的值是padding:2px 9px;最重要的是调后面的9px。最后IE6的效果如下:
但是郁闷的是,opera似乎不支持这个效果,不过总的来说,用我这种方法能兼容IE6 7 8 9,火狐,谷歌,应该也算差不多了。 |
input type='button'里面的文字换行
最新推荐文章于 2023-12-06 09:48:20 发布