display:inline重设高度和宽度
|
我在http://jsfiddle.net/GKnkW/2/创建了示例
html
<!DOCTYPE html>
<html>
<head>
<title>Test</title>
</head>
<body>
<div class=\"step\">1</div>
<div class=\"step\">2</div>
<br/><br/>
<div class=\"step1\">3</div>
<div class=\"step1\">4</div>
</body>
</html>
的CSS
.step
{
height:150px;
width:150px;
background:yellow;
display:inline;
}
.step1
{
height:150px;
width:150px;
background:yellow;
}
我想并排显示两个div及其原始高度和宽度(在CSS中设置)
一旦我将display:inline属性添加到CSS中,它似乎就会失去先前定义的高度和宽度。 [用#1和#2检查divs似乎松动了高度和宽度设置]
有人可以指出我似乎正在做的错误或此怪异行为的解决方法吗?
没有找到相关结果
已邀请:
4 个回复
疮痪徘弦漏
。
死狸蔽垂藐
豪抱怒掳
妊辽剁茧
的CSS