
<html>
<head>
<meta charset="utf-8">
<title>标题</title>
<style type="text/css">
body,ul,li{margin:0; padding:0; font-size:14px; list-style:none; font-family:Verdana, Geneva, sans-serif}
main{width:600px; line-height:40px; margin:0 auto}
up, down{height:40px; line-height:40px; padding:0 20px; margin-top:20px; border:1px #ccc solid}
up{overflow:hidden / 这里是清除浮动 /}
up em{float:right}
</style>
</head>
<body>
<div class="main">
<div class="up"><span>这是上面div内的span标签内的内容</span><em>这是em标签内的内容,而且是右浮动</em></div>
<div class="down">这是下面div的内容</div>
</div>
</body>
</html>
有问题可以随时问我,希望能帮到你
<html><head>
<style type="text/css">
{
margin:0px;
padding:0px;
}
dcla{
display:block;
width:500px;
height:400px;
}
</style>
</head>
<body class="bg">
<div class='dcla'>
<img src="desertjpg" width="100%" height="100%"/>
</div>
</body>
</html>
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)