木有变成宋体,还是原来的雅黑<!DOCTYPE HTML>
<!-- 0006美化字体,learned from 不二如是 -->
<html>
<head>
<meat charset="utf-8">
<title>welcome to the world of HTML</title>
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<meta name="keywords" content="STmove,test">
<meta name="description" content="学习测试">
<meta name="author" content="STmove">
<style type="text/css">
html
{
height:100%;
font-family:sans-serif; /*没反应啊*/
}
body
{
background:url("320980.jpg") center center; /*设置背景图水平和垂直位置为居中 */
background-size:cover; /*cover:把背景图像扩展至足够大,以使背景图像完全覆盖背景区域。背景图像的某些部分也许无法显示在背景定位区域中。*/
margin:0;
padding:0;
<!-- position:relative; --> /*相对坐标*/
}
#container
{
width:100%;
text-align: center; /*文字位置水平居中*/
position: absolute; /*绝对坐标*/
top:50%; /*距顶50%*/
transform:translateY(-50%); /*transform:该属性允许我们对元素进行旋转、缩放、移动或倾斜。translateY(-50%):沿Y轴整体上移一半*/
}
h1
{
color:#0bf;
font-size:66px;
margin-bottom:22px; /*设置与下面P元素之间的距离*/
}
p
{
color:#afe;
font-size:33px;
margin-bottom:22px;
}
a
{
color:#fff;
font-size:50px;
}
</style>
</head>
<body>
<div id="container">
<h1>我爱鱼兮</h1>
<p>www.FishC.org-让编程改变世界</p>
<a href="http://www.FishC.org" target="_blank">JOIN US</a>
</div>
</body>
</html>
|