最新文章专题视频专题问答1问答10问答100问答1000问答2000关键字专题1关键字专题50关键字专题500关键字专题1500TAG最新视频文章推荐1 推荐3 推荐5 推荐7 推荐9 推荐11 推荐13 推荐15 推荐17 推荐19 推荐21 推荐23 推荐25 推荐27 推荐29 推荐31 推荐33 推荐35 推荐37视频文章20视频文章30视频文章40视频文章50视频文章60 视频文章70视频文章80视频文章90视频文章100视频文章120视频文章140 视频2关键字专题关键字专题tag2tag3文章专题文章专题2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章专题3
当前位置: 首页 - 科技 - 知识百科 - 正文

求input,button对齐技巧_html/css_WEB-ITnose

来源:动视网 责编:小采 时间:2020-11-27 15:49:33
文档

求input,button对齐技巧_html/css_WEB-ITnose

求input,button对齐技巧_html/css_WEB-ITnose:求input,button对齐技巧 button *{padding:0;margin:0} body{padding:30px;} .search{ height:50px; line-height:50px; background-color:tan; } Input your key words submit 回复讨论(解决方
推荐度:
导读求input,button对齐技巧_html/css_WEB-ITnose:求input,button对齐技巧 button *{padding:0;margin:0} body{padding:30px;} .search{ height:50px; line-height:50px; background-color:tan; } Input your key words submit 回复讨论(解决方


求input,button对齐技巧

button				


回复讨论(解决方案)

避免使用button元素吧,用input type="button"代替。

    

可以写样式的嘛,定义一下input的宽高就行了。

设置统一样式

font-family:Arial,sans-serif,Tahoma; /*规定同一字体*/
font-size:12px; /*规定同一字体大小*/
height:25px; /*解决Safari和Chrome下的高度问题*/
line-height:15px; /*协调height,让文字居中*/
overflow:visible; /*只有设置这个属性IE下padding才能生效*/
padding:0 0.5em; /*chrome、ff默认值;调整其值,让IE和其他浏览器的一样*/

加上

input,button{ vertical-align:middle} 
试试

设置成居中就行了呗

文档

求input,button对齐技巧_html/css_WEB-ITnose

求input,button对齐技巧_html/css_WEB-ITnose:求input,button对齐技巧 button *{padding:0;margin:0} body{padding:30px;} .search{ height:50px; line-height:50px; background-color:tan; } Input your key words submit 回复讨论(解决方
推荐度:
标签: 小技巧 按钮 对齐
  • 热门焦点

最新推荐

猜你喜欢

热门推荐

专题
Top