div从左往右css,CSS div浮动 - 从上到下,从左到右

6 个答案:

答案 0 :(得分:3)

答案 1 :(得分:0)

1)在这种情况下,您必须采用列div(图像中的红色),并且必须将其他div 1,2,3,4放在此div中...如图像

rGUVm.jpg

将以下属性提供给div。

.message,.outer_div {

float:left;

height:auto;

宽度:200px;

}

2)在另一种情况下,如果你想从左到右,从上到下,那么你不需要有一个外部的div ...用红色指定

答案 2 :(得分:0)

你可以试试这个......

ul {

width:60px; height: 60px;

}

ul li{

float:left;

width:20px;

list-style:none;

}

ul, ul li {

-moz-transform: rotate(-90deg) scaleX(-1);

-o-transform: rotate(-90deg) scaleX(-1);

-webkit-transform: rotate(-90deg) scaleX(-1);

-ms-transform: rotate(-90deg) scaleX(-1);

transform: rotate(-90deg) scaleX(-1);

/* IE8+ - must be on one line, unfortunately */

-ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=-3.061616997868383e-16, M12=1, M21=1, M22=3.061616997868383e-16, SizingMethod='auto expand')";

/* IE6 and 7 */

filter: progid:DXImageTransform.Microsoft.Matrix(

M11=-3.061616997868383e-16,

M12=1,

M21=1,

M22=3.061616997868383e-16,

SizingMethod='auto expand');

}

答案 3 :(得分:0)

.message {

width:90px;

margin:3px;

background-color:#dfdfdf;

float : left;

}

如果从左到右,从上到下为你工作,请尝试这个。

答案 4 :(得分:-1)

从contentDiv中删除高度并放置float:left;以便它包装您的内容。

答案 5 :(得分:-2)

我在你的例子中试过这个:

.message {

width:90px;

margin:3px;

background-color:#dfdfdf;

position:absolute;

}

它有帮助。

祝你好运!

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值