CSS里面怎么给布局加边框!!!

怎么给绿色部分加个边框呢

第1个回答  2011-09-16
绿色的部分是个div吧 可以这么写 <div stlyle="border:solid 1px #000;">
内容
</div>

就是直接在div上加样式代码 stlyle="border:solid 1px #000;" 其中#000,是颜色,你可以随意调的,solid 表示线的类型,有虚线啥的,好多,1px表示线的宽度。
第2个回答  2011-09-16
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head>
<style type="text/css">
.tupian1{
width:200px; height:100px; border-bottom:1px solid #CCC;}
.tupain2{
width:200px; height:100px; border-bottom:1px solid #CCC;}
</style>
<body>
<div class="tupian1">div1</div>
<div class="tupain2">div2</div>
</body>
</html>本回答被提问者采纳
第3个回答  2011-09-16
border:1px solid #FF0000
1px是边框大小,solid是边框样式(solid是实线),#FF0000是边框颜色(#FF0000是红色)
第4个回答  2011-09-16
给这个层加上边框就行了
相似回答