如何將盒子分成?我需要一個左側的盒子和右側的另一個盒子,兩個盒子之間沒有任何空間。這兩個盒子只能用一條線隔開。兩個盒子應該並排放置。使用HTML或CSS。我需要2個並排的盒子,它們之間沒有空格由HTML和CSS組成
0
A
回答
0
對於該行用作分隔符,可以使用右側的邊框,但我建議對右側的框使用左側的邊框。 只需使用兩個帶顯示的div:內聯屬性和每個寬度:50%;
0
0
可選地,使用一個Flexbox的用隔離div
。
.container {
display: flex;
height: 3em;
}
.left {
background-color: blue;
width: 40%;
}
.separator {
width: 1px;
background-color: darkgray;
}
.right {
background-color: red;
width: 40%;
}
<div class="container">
<div class="left"></div>
<div class="separator"></div>
<div class="right"></div>
</div>
0
試試這個:
.c1, .c2 {
width: 200px;
height: 200px;
float: left;
}
.c1 {
background-color: red;
}
.c2 {
background-color: blue;
border-left:1px solid #000;
}
<div class="c1"></div>
<div class="c2"></div>
相關問題
- 1. 2個div之間的HTML/CSS空間
- 2. publicId和systemId之間需要有空格
- 3. 在css和html中製作盒子並將它們放在網格中
- 4. 有兩個div元素,它們之間沒有空格
- 5. 2 ContentViews與它們之間的滑動動作並排排列
- 6. 顯示CSS盒子並排
- 7. Flex/Bison匹配2種不同的圖案,它們之間沒有空格
- 8. html/css設計的盒子沒有正確排隊
- 9. 將2個盒子[div's]並排放置
- 10. 2 CSS文本 - 1電子郵件addy - 我如何並排排列它們?
- 11. 需要設計Div的邊框和它們之間的一些空間
- 12. C#合併2個字典和它們之間增加值
- 13. 垂直排序對象與它們之間的空白空間
- 14. 我需要停止盒子
- 15. CSS之前和之後的盒子
- 16. php和html之間不需要的空間
- 17. 我有一個數組,我把它們放在桌子上,我需要改變表格的背景顏色
- 18. 刪除html/css中元素之間的空格(離子)
- 19. 六角形瓷磚沒有正確排列,在它們之間的空隙
- 20. HTML/CSS CSS盒子和定位
- 21. 頁腳和子圖像之間不需要的空間
- 22. 盒模型錯誤和新的盒子尺寸CSS之間有什麼區別?
- 23. 鍵盤需要字母與字之間只有一個空格
- 24. 如何保存由2個字符串組成的偏好並顯示它們?
- 25. 圖像/文字之間需要空格HTML
- 26. 如何垂直allign一個div內的圖像,它們之間沒有空間
- 27. 我得到了一個由兩個數字組成的字符串和它們之間的空格,如何將這些數字保存在兩個變量中?
- 28. 找到2個符號之間的空間,而不考慮第二組2個符號之間的空格
- 29. 兩個html電子郵件表格之間的空間Outlook 2007,2013
- 30. 如何找到複合詞,刪除它們之間的空格,並將它們替換爲我的語料庫?
你有任何的代碼?你到目前爲止嘗試了什麼?你讀過/使用了哪些資源? –