返回CSS设置背景......登陆

CSS设置背景颜色和边框

夜半钟声2019-01-30 15:34:57340
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>CSS</title>
<style>
body{margin:0;}
.main{margin:0px auto; width:500px; padding:10px;}
.title{ width:100%;height:50px; line-height:50px; text-align:center; font-size:24px; background-color:#09F; color:#FFF; margin-bottom:5px;}
.title2{ width:100%;height:50px; line-height:50px; text-align:center; font-size:24px; border:1px solid #09F; margin-bottom:5px;}
.title3{ width:100%;height:50px; line-height:50px; text-align:center; font-size:24px; border-bottom:2px solid #09F; margin-bottom:5px;}
</style>
</head>
<body>
<div class="main">
<div class="title">PHP中文网</div>
<div class="title2">PHP中文网</div>
<div class="title3">PHP中文网</div>
</div>
</body>
</html>


最新手记推荐

• 用composer安装thinkphp框架的步骤• 省市区接口说明• 用thinkphp,后台新增栏目• 管理员添加编辑删除• 管理员添加编辑删除

全部回复(0)我要回复

暂无评论~
  • 取消回复发送