<!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>
<title>页面全局属性设置</title>
<meta name="keywords" content="自定义关键字"/>
<meta name="description" content="自定义描述"/>
<meta http-equiv="content-type" content="text/html;charset=utf-8"/>
<style type="text/css">
body{
margin:0;
/*
margin:0; 网页内容距离浏览器上、下、左、右边框的距离均为0
*/
/*
margin:0 5px; 网页内容距离浏览器上、下边框距离为0,左、右边框距离为5px
*/
/*
margin:0 10px 5px; 网页内容距离浏览器上边框距离为0,下边框距离为5px,左、右边框距离为10px
*/
/*
margin:0 1px 2px 3px; 网页内容距离浏览器上、右、下、左距离分别为0、1px、2px、3px
*/
padding:0; /*设置方法和margin一样*/
font-size:12px; /*设置整个页面字体(小9px 中12px 大14px)*/
color:#364f56; /*设置网页字体颜色*/
background-color:#FFFFFF; /*设置网页背景*/
overflow:hidden; /*去掉页面滚动条*/
}
</style>
</head>
<body>
这是一段网页内容<br/>
这是一段网页内容<br/>
这是一段网页内容<br/>
这是一段网页内容<br/>
这是一段网页内容<br/>
这是一段网页内容<br/>
</body>
</html>
效果截图:
div+css基础——1.页面全局属性设置
最新推荐文章于 2024-03-16 20:05:58 发布