<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>CSS定位一个栏目带标题的</title>
<!--
外面的框子为:
宽度,高度,边框 实线/虚线 颜色,margin,padding.
里面的水平线:
高度,字体大小,背景色,字行距,左右行距,margin,padding
# 为 id
. 为 class
这里是类的派生. 被conter 层包围的 hr 标签.
-->
<style>
.conter
{
width:190px;
height:200px;
border:1px solid #000;
margin:0px auto;
padding:0px;
}
.conter h1
{
height:20px;
font-size:12px;
background:#CC6600;
line-height:20px;
text-indent:5px;
margin-top:0px;
}
</style>
</head>
<body>
<div class="conter"><h1>kalision</h1>
<p>1</p>
<p>2</p>
<p>3</p>
</div>
</body>
</html>
使用div + css 实现Panel效果
最新推荐文章于 2024-03-01 17:19:57 发布