JQuery Mobile 1.4头距 [英] JQuery Mobile 1.4 header spacing

查看:64
本文介绍了JQuery Mobile 1.4头距的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的标题中,当我将一个搜索文本输入元素放入一个div中时,它会在顶部添加大量空间。我已经尝试在所有元素上设置margin / padding 0,但额外的空间仍然存在:

 < div><<< ; input data-theme =adata-type =textdata-mini =truedata-clear-btn =true>< / div> 

http://jsfiddle.net/155pr11x/

解决方案

这是由一些额外的不间断空格字符在您的源代码中被翻译为& nbsp;



我猜你被抓到从他们的网站复制/粘贴代码,请参阅 Jquery Mobile自动添加& nbsp



没有空格的小提琴更新 http://jsfiddle.net / 155pr11x / 1 /

When I place a search text input element inside a div in my header it gets a lot of space added to the top. I've tried setting margin/padding 0 on all the elements but the extra space is still there:

<div><input data-theme="a" data-type="text" data-mini="true" data-clear-btn="true"></div>

http://jsfiddle.net/155pr11x/

解决方案

It's caused by some extra non-breaking space characters in your source which get translated to &nbsp;.

I'm guessing you've been caught by copying/pasting code from their website, see Jquery Mobile automatically adds &nbsp

Updated fiddle without the whitespace http://jsfiddle.net/155pr11x/1/

这篇关于JQuery Mobile 1.4头距的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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