换行CSS

时间:2018-03-06 08:03:45

标签: css

我想使用CSS插入一个换行符,有两个类:select2-search-field和select2-search-choice它们与li元素在同一个div中 我可以建议任何方式我可以打破他们填充两行。

我尝试过:How to insert a line break before an element using CSS

以下是我希望在“select2-search-choice”类和" select2-search-field"

<之间

  • 实现换行符的代码段/ p>
    <div class="counterPartyId">
        <ul class="select2-choices">
            <li class="select2-search-choice">
                <div>ABN nv,</div>
            </li>
            <li class="select2-search-field" >
                <label for="s2id_autogen5" class="select2-offscreen"></label>
                <input type="text" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" class="select2-input" id="s2id_autogen5" placeholder="" style="width: 103px;" aria-activedescendant="select2-result-label-7">
            </li>
        </ul>
    </div>
    
  • 2 个答案:

    答案 0 :(得分:1)

      

    使用css代码&#34; display:block&#34;

    &#13;
    &#13;
    spark.read.json("s3a://path1/file1","s3a://path1/file2" ...)
    
    &#13;
    li {
      display: block;
     }
    &#13;
    &#13;
    &#13;

    答案 1 :(得分:0)

    如果您希望他们占据每一行,您只需要将'display: block'添加到li

    &#13;
    &#13;
    ul li { display: block; }
    &#13;
    <div class="counterPartyId">
                                    <ul class="select2-choices">  
                                                    <li class="select2-search-choice">    
                                                                    <div>ABN nv,</div>    
                                                    </li>
                                                    <li class="select2-search-field" >    
                                                    <label for="s2id_autogen5" class="select2-offscreen"></label>    
    <input type="text" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" class="select2-input" id="s2id_autogen5" placeholder="" style="width: 103px;" aria-activedescendant="select2-result-label-7">  
                                                    </li>
                                    </ul>
    </div>
    &#13;
    &#13;
    &#13;