簡體   English   中英

如何為背景顏色划分引導容器?

[英]how can I division bootstrap container for background color?

我想划分引導容器以更改背景。 我不想在容器內使用 row 和 col。

我附上一張圖片來說明。 在此處輸入圖片說明

<div class="left_side">
   <!-- Your content-->
</div>

<div class="right_side">
  <!-- Your content-->
</div>

在樣式表中

<style>
    body
     {
          width:100%;
      }
    .left_side,.right_side
          {
            width:50%;
            height:100px; /*Depends on your content make it as height:auto;*/
            float:left;
          }
    .left_side
         {
            background-color:gray;
          }
      .right_side
         {
            background-color:white;
          }
</style>

這是 JSfiddle 鏈接https://jsfiddle.net/no0Lz0o7/

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM