参见图片 - 我想带上'左边'并且'对'更靠近在一起,所以它们保持尽可能接近标题,上面是蓝色。
这是我左右两边的CSS ...非常感谢!
.left {
float: left;
position: relative;
background-color: #DDFF00;
margin-top: 40px;
margin-bottom: 10px;
height: 500px;
width: 10%;
}
.right {
float: right;
position: relative;
background-color: #FFE6E6;
margin-top: 40px;
margin-bottom: 10px;
margin-left: 10px;
height: 500px;
width: 88%;
}
答案 0 :(得分:1)
.left {
float: left;
position: relative;
background-color: #DDFF00;
margin-top: 40px;
margin-bottom: 10px;
height: 500px;
width: 10%;
}
.right {
float: right; /*<-change to left */
position: relative;
background-color: #FFE6E6;
margin-top: 40px;
margin-bottom: 10px;
margin-left: 10px; /*<-and play with that too*/
height: 500px;
width: 88%; /*<-or increase that, without any changes above */
}