Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/tfs/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Css JQM更改垂直位置_Css_Jquery Mobile - Fatal编程技术网

Css JQM更改垂直位置

Css JQM更改垂直位置,css,jquery-mobile,Css,Jquery Mobile,我对JQMobile有问题。我有两个div,高度必须相等,所以我在周围的div上使用display:table,在我的内容周围使用display:table单元格。 然而,问题是,虽然它与普通HTML/CSS一起工作,但当我使用JQM时,它会变得一团糟 基本的代码结构是 <div style="display: table; width: 100%;"> <div style="width: 49%; display: table-cell">

我对JQMobile有问题。我有两个div,高度必须相等,所以我在周围的div上使用display:table,在我的内容周围使用display:table单元格。 然而,问题是,虽然它与普通HTML/CSS一起工作,但当我使用JQM时,它会变得一团糟

基本的代码结构是

<div style="display: table; width: 100%;">    
   <div style="width: 49%; display: table-cell">
      My content 1
   </div>
   <div style="width: 49%; display: table-cell">
      My content 2
   </div>
</div>

我的内容1
我的内容2
Fiddle at

好的,简单的(但不是很明显的解决方案)是添加一个简单的垂直对齐:top as

<div style="display: table; width: 100%;">    
   <div style="width: 49%; display: table-cell; vertical-align:top;">
      My content 1
   </div>
   <div style="width: 49%; display: table-cell">
      My content 2
   </div>
</div>

我的内容1
我的内容2