Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/89.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
Html 将css属性指定给父对象,而不是子对象_Html_Css_Smartadmin - Fatal编程技术网

Html 将css属性指定给父对象,而不是子对象

Html 将css属性指定给父对象,而不是子对象,html,css,smartadmin,Html,Css,Smartadmin,在我的应用程序中,我使用的是引导标记Input angular version(在smartadmin中),如下所示 引导输入标记的代码: <div class="row"> <div class="col-sm-12"> <div class="form-group"> <label>Type and enter to add an SMA</label>

在我的应用程序中,我使用的是引导标记Input angular version(在smartadmin中),如下所示

引导输入标记的代码:

<div class="row">
     <div class="col-sm-12">
          <div class="form-group">
               <label>Type and enter to add an SMA</label>
               <input smartTags class="form-control tagsinput" value="{{tagsValues}}" data-role="tagsinput">
          </div>
     </div>
</div>
正如我在上图中所示,bootstrap输入标签元素并没有出现在这个popover中


可能是因为这个输入字段也继承了
css
属性。因此,有没有任何方法使那些
css
属性不会被
输入
标记或
表单中的元素继承

似乎覆盖了css定义,这使得
元素显示块而不是浮动/内联

我不知道这是否是解决方案,但考虑到这两种情况之间的差异,我建议关闭
元素前面的
标记,而不是输入元素后面的标记,例如:

<label class="form-control" style="border:0px;height:auto">
</label>
<input id="smartTagInput" smartTags class="form-control tagsinput" value="{{smaValues}}" data-role="tagsinput">

还有整个片段:

<div class="widget-toolbar">
            <div class="btn-group dropdown dropdown-large" dropdown>
                <a class="button-icon" title="SMA Filter" dropdownToggle aria-expanded="true">
                    <i class="fa fa-cog"></i>
                </a>
                <div class="dropdown-menu dropdown-menu-large filterDropwdownViewAlign" (click)="$event.stopPropagation()">
                    <div id="checkout-form" class="smart-form">
                        <header id="filterHeader">SMA</header>
                        <fieldset>
                            <form>
                                <div class="row form-group">
                                    <section class="col col-xs-12">
                                        <label class="form-control" style="border:0px;height:auto">
                                        </label>
                                            <input id="smartTagInput" smartTags class="form-control tagsinput" value="{{smaValues}}" data-role="tagsinput">

                                    </section>
                                </div>
                            </form>
                        </fieldset>
                    </div>
                </div>
            </div>
        </div>

SMA

Direct child css选择器是否可以帮助您?看起来你把它变成了一个块级元素,如果你必须使用它,总会有一些错误!在你的css中,这一点很重要……是否有任何方式使得标记中的任何内容都不能继承我应用于popover@jirigracik我以前没有试过!很重要,但这并没有改变什么
<label class="form-control" style="border:0px;height:auto">
</label>
<input id="smartTagInput" smartTags class="form-control tagsinput" value="{{smaValues}}" data-role="tagsinput">
<div class="widget-toolbar">
            <div class="btn-group dropdown dropdown-large" dropdown>
                <a class="button-icon" title="SMA Filter" dropdownToggle aria-expanded="true">
                    <i class="fa fa-cog"></i>
                </a>
                <div class="dropdown-menu dropdown-menu-large filterDropwdownViewAlign" (click)="$event.stopPropagation()">
                    <div id="checkout-form" class="smart-form">
                        <header id="filterHeader">SMA</header>
                        <fieldset>
                            <form>
                                <div class="row form-group">
                                    <section class="col col-xs-12">
                                        <label class="form-control" style="border:0px;height:auto">
                                        </label>
                                            <input id="smartTagInput" smartTags class="form-control tagsinput" value="{{smaValues}}" data-role="tagsinput">

                                    </section>
                                </div>
                            </form>
                        </fieldset>
                    </div>
                </div>
            </div>
        </div>