1.
font-size: 50px; /*px像素*/
font-family: 宋体; /*字体类型*/
font-weight: normal; /*字体粗细*/
text-align: center; /*位置,居中、左对齐、右对齐*/
text-indent: 2em; /*段落首行缩进,em相对单位,总是等于本元素的字体大小*/
line-height: 100px;
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>css样式</title>
<!--style是一个特殊的标签,只能写css代码,-->
<style>
/*
一个css规则分两部分:1.选择器 2.样式列表
样式列表写在{...}里边
*/
h2{
color:aqua;
font-size:150px;
}
p{
color:aquamarine;
font-size:100px;
}
body{
background-color: rgb(218, 140, 24);
background-image: url(timg.jpg);
background-size: 100%;
}
</style>
</head>
<body>
<h1 style="color: red; font-size:100px">智能教育</h1>
<h2>标题</h2>
<p>副标题</p>
</body>
</html>
2.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>css常用样式</title>
<style>
p{
font-size: 50px; /*px像素*/
font-family: 宋体; /*字体类型*/
font-weight: normal; /*字体粗细*/
text-align: center; /*位置,居中、左对齐、右对齐*/
text-indent: 2em; /*段落首行缩进,em相对单位,总是等于本元素的字体大小*/
line-height: 100px;
}
</style>
</head>
<body>
<p>css里的常用样式,1231231321231321321321321321321321321321</p>
</body>
</html>