怎么样用定位(position属性)修改代码,使得id为left,middle,right的三块div横着排列?

2025-02-25 15:50:26
推荐回答(1个)
回答1:

不知道怎么用position属性,但是还可以用浮动来实现让这三个横着排列,代码如下:
#left{
height:350px;
width:34%;
background:#008000;
float:left;
}
#middle{
height:350px;
width:33%;
background:blue;
float:right;
}
#right{
height:350px;
width:33%;
background:purple;
float:right;
}