首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法在tablets和iPad的复选框中显示右勾号标记

无法在tablets和iPad的复选框中显示右勾号标记
EN

Stack Overflow用户
提问于 2015-09-03 13:29:37
回答 1查看 1.2K关注 0票数 0

我有以下代码,它会在桌面上显示勾选标记。但在iPad和平板电脑上不起作用。功能正常,但未显示右侧标记。

代码语言:javascript
复制
<div class="col-xs-2 col-sm-2 col-md-2 col-lg-2 borderAtRight" 
					
  <!--  Dropdown and Menu -->
  <div class="btn-group topFilterCtrl filterDropdn" dropdown 
    dropdown-append-to-body
    id="ddlStatus">
      <div id="btn-append-to-body" type="button" 
        class="btn btn-primary panelTextFont14 noBorder" 		
        dropdown-toggle>
        Status<span class="caret caretSpan"></span>
      </div>
      <ul class="dropdown-menu dropDownLabel" role="menu" 
        aria-labelledby="btn-append-to-body" 
        ng-show="!vm.showthis">
          <div class="customScroll">
            <li role="menuitem" class="changeColorOnHover"
              ng-repeat="optionThis in vm.List track by $index" 
              ng-show="list.value != null">
              <a href="#">
              <div class="checkbox" id="{}index}"
                ng-show="this.value != null"
                ng-click="vm.applyFilterForResultCount()"
                ng-change="vm.getCount(this)"
                ng-model="this.flag">
                <label>
                  <input type="checkbox" 
                    ng-click="vm.clickStatusCheckBox(this);$event.stopPropagation();" 
                    ng-show="this.value != null"/>
                  {{this.value}}
                </label>
              </div>
            </a>
          </li>
        </div>
        <!--Clear div-->
        <li role="menuitem" class="btn btn-default buttonli"
          ng-click="vm.clearAll()">
          <a href="#">
            <p>
              <span class="clearAllBtn">Clear</span>
              <span class="dropDownBtnItem">  – All </span>
            </p>
          </a>
        </li>
      </ul>
    </div>
  </div>

代码语言:javascript
复制
.topFilterCtrl{
    text-align: left;
    vertical-align: middle;
    padding-top: 8%;
    padding-bottom: 0%;
    border-radius: 0;
    margin-top: 0%;
    box-shadow: none;
    outline: none;
    border:none;
    width:100%;
}

portrait:

div.borderAtRight .filterDropdn{
    padding-top:14%;
}

.filterDropdn{
    padding-top: 10%;
    height: 50px;
    max-height: 50px;
    overflow: hidden;
}

.noBorder{
    text-align: left;
    width:@full-width;
    box-shadow: none;
    outline: none;
    min-width: 80%;
    padding: 0;
    height: auto;
    min-height: 36px;
    border-top-color: none;
    border-top-style: none;
    border-top-width: none;
    border-right-color: none;
    border-right-style: none;
    border-right-width: none;
    border-bottom-color: none;
    border-bottom-style: none;
    border-bottom-width: none;
    border-left-color: none;
    border-left-style: none;
    border-left-width: none;
}

.dropDownLabel{
    margin:0 0 0 -16px;
}

.customScroll{
    height: auto;
    overflow-x: hidden;
    max-height:360px;
}

.customScroll>li>a, 
.customScroll>li>a:hover, 
.customScroll>li>a:active, 
.customScroll>li>a:focus {
    display: block;
    padding: 1px 22px;
    clear: both;
    white-space: nowrap;
    text-decoration : none;
}

.buttonli {
    border-left: 0;
    border-right: 0;
    border-radius: 0;
    margin: 2px 0px 2px 0px;
    width: 100%;
    background-color:#E4EAEF;
}

li.buttonli > a > p{
    margin-bottom:0;
}

input[type="checkbox"]{
    -webkit-appearance: checkbox;
}

我发现了这个:https://github.com/angular-ui/bootstrap/issues/2017

但我不确定如何实现它,我应该在我的代码中真正包含此指令的地方,因为我对AJS非常陌生?

EN

回答 1

Stack Overflow用户

发布于 2015-09-03 14:36:50

复选框可能无法正确显示,因为input元素嵌套在label元素中(即使它可能被允许,但它混淆了输入和标签的用途)。

如果问题是在默认情况下没有选中复选框,那么您可能需要检查Angular的ng-checked="expression"语法。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/32367621

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档