Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/85.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/22.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
有人能告诉我为什么我的jQuery手机按钮中会出现这个空白吗?_Jquery_Jquery Mobile - Fatal编程技术网

有人能告诉我为什么我的jQuery手机按钮中会出现这个空白吗?

有人能告诉我为什么我的jQuery手机按钮中会出现这个空白吗?,jquery,jquery-mobile,Jquery,Jquery Mobile,我想不出怎么去掉按钮右边的这条白线。问题是: 这是我的密码: <!DOCTYPE html><html><style type="text/css"> </style><head><title></title> <link rel="stylesheet" href="http://code.jquery.com/mobile/1.2.0/jquery.mobil

我想不出怎么去掉按钮右边的这条白线。问题是:

这是我的密码:

    <!DOCTYPE html><html><style type="text/css">
        </style><head><title></title>

        <link rel="stylesheet" href="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.css" />
        <script src="http://code.jquery.com/jquery-1.8.2.min.js"></script>
        <script src="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.js"></script></head><body>

        <div data-role="navbar" >
            <ul>
                <li><a id='button1' data-theme ="a" data-iconpos="top">Button 1</a></li>
                <li >  <a id='button2' data-theme ="a" data-iconpos="top">Button 2</a></li>
<li >  <a id='button3' data-theme ="a" data-iconpos="top">Button 3</a></li>
</ul>
        </div><!-- /navbar -->

        <div data-role="navbar" >
            <ul>
                <li><a id='button4' data-theme ="a" data-iconpos="top">Button 4</a></li>
                <li >  <a id='button5' data-theme ="a" data-iconpos="top">Button 5</a></li>

                <li >  <a id='button11' data-theme ="a" data-iconpos="top">Button 6     </a></li>
            </ul>
        </div><!-- /navbar -->

        <div data-role="navbar" >
            <ul>
                <li><a id='button6' data-theme ="a" data-iconpos="top">Button 7</a></li>
                <li >  <a id='button10' data-theme ="b" data-iconpos="top">Button 8</a></li>
            </ul>
        </div><!-- /navbar -->

    </body></html>

  • 按钮1
  • 按钮2
  • 按钮3
  • 按钮4
  • 按钮5
  • 按钮6
  • 按钮7
  • 按钮8
将类(即class=“lastbut”)设置为每行的最后一个按钮。 然后,在CSS中执行以下操作:

.lastbut {
   width:34% !important;
}
33%+33%+33%等于99%,你会看到白色的1%
如果要修复,其中一个按钮应为34%。

在CSS中尝试以下代码:

.ui-grid-b > :nth-child(n) {
   margin-right: 0px!important;
 }

我通过使用navbar div上的overflow-x:hidden解决了这个问题:

<div data-role="navbar" data-iconpos="top" style="overflow-x:hidden">


他在HTML中引用css。它只是JQuery Mobile-
您的按钮可以根据容器的大小进行缩放,因此按钮的宽度为33%。你看到的像素是额外的1%。您在第三行中看不到像素,因为两个按钮都缩放到50%。