div+css基础——1.页面全局属性设置

来源:互联网 发布:知乎 父母的爱 编辑:程序博客网 时间:2024/06/06 05:56
<!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>
效果截图:
原创粉丝点击