精品学习网->精美文摘

上一篇    全部文章
Document


网页版面的简单设置(字体、背景色、换行、居中)

这是第一行; 这是第二行; 这是第三行; 图片居中: 网页内容如下: <html lang="en"> <head> <meta charset="UTF-8"> <meta name="Generator" content="EditPlus®"> <meta name="Author" content=""> <meta name="Keywords" content=""> <meta name="Description" content=""> <title>Document</title> <!--设置pre:回车换行,空格显示空白,文本超出屏幕时自动换行 --> <!--设置背景色及字体 --> <!--设置标题文本居中 --> <style> pre { white-space: pre-wrap; /* CSS-3 */ white-space: -moz-pre-wrap; /* Mozilla, since 1999 */ white-space: -pre-wrap; /* Opera 4-6 */ white-space: -o-pre-wrap; /* Opera 7 */ Word-wrap: break-word; /* Internet Explorer 5.5+ */ font-family:宋体; } body {font-size:24px;background:rgb(204,232,207);} img {display: block;margin-left:auto;margin-right:auto; } h1,h2,h3,h4,h5,h6 {text-align:center;} </style> </head> <body> <pre><!-- 回车换行--> <h2>设置网页字体、背景色、换行、居中</h2> 这是第一行; 这是第二行; 这是第三行; 下面图片水平居中: <img src="exampleimg/1-2.jpg" width="120" height="120" border="0" alt=""> </body> </html>

     返回顶部
设置网页字体、背景色、换行、居中