61,112
社区成员
发帖
与我相关
我的任务
分享
<html>
<head>
<style type = "text/css">
div {
border :1px solid black ;
margin :1em ;
}
.next {
float :left ;
}
</style>
</head>
<body>
<div>
<h1>ABC</h1>
<div class = "next">
<img src = "1.jpg" />
<p>ABC</p>
</div>
</div>
</body>
</html>
<html>
<head>
<style type = "text/css">
.one {
border :1px solid black ;
margin :1em ;
height:auto;
}
.next {
float :left ;
}
</style>
</head>
<body>
<div class="one">
<h1>ABC</h1>
<div class = "next">
<img src = "1.jpg" />
<p>ABC</p>
</div>
<div style="clear:both" ></div>
</div>
</body>
</html>
<html>
<head>
<style type = "text/css">
div{ border :1px solid black ; width:900px; overflow:hidden; margin :1em ; }
.next { float :left ; margin:0px auto; border:none }
</style>
</head>
<body>
<div>
<h1>ABC</h1>
<div class = "next">
<img src = "1.jpg" />
<p>ABC</p>
</div>
</div>
</body>
</html>
<html>
<head>
<style type = "text/css">
div {
border :1px solid black ;
margin :1em ;
}
.next {
float :left ;
}
</style>
</head>
<body>
<div>
<h1>ABC</h1>
<div class = "next">
<img src = "1.jpg" />
<p>ABC</p>
</div>
<div style="clear:both;visibility:hidden;"></div>
</div>
</body>
</html>