小编Sun*_* P.的帖子

如何在嵌套div下面放置一个div?

如何在嵌套div下面放置div?现在,当我希望它出现在第二个div(.box2)下面时,第三个div(.box3)似乎与第二个div重叠.请参阅示例:https://jsfiddle.net/662fwmq5/

.box1 {
  width: 50%;
  height: 200px;
  padding: 15px;
  background-color: red;
  margin: 0 auto;
}
.box2 {
  width: 80%;
  padding: 15px;
  background-color: blue;
  color: #fff;
  margin: 0 auto;
  margin-top: 100px;
}
.box3 {
  background-color: #ccc;
  text-align: center;
}
Run Code Online (Sandbox Code Playgroud)
<div class="box1">
  Box 1
  <div class="box2">
    Fixed income, currency, and commodities revenue was $2.65 billion ($2.21 billion expected), up 39% thanks to stronger performance in credit products, especially mortgages, as well as in rates products and client financing. Equities …
Run Code Online (Sandbox Code Playgroud)

html css html5

5
推荐指数
1
解决办法
50
查看次数

标签 统计

css ×1

html ×1

html5 ×1