educoder答案-CSS样式规则-太原理工大学
太原理工大学 Web程序设计基础2021秋答案 educoder
本实训项目为廖丽娟老师团队自己编写的实训项目,此账号超前更新答案,助力各校友学好web
第1关:CSS基础知识
B D C A B
第2关:初识CSS
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>初识CSS样式</title>
</head>
<body>
<div style="background-image:url(https://www.educoder.net/api/attachments/1426624);width:360px;height:260px;">
<!-- ********* Begin ********* -->
<h1 style="font-family:楷体;text-align:center;line-height:2;">静夜思</h1>
<h2 style="font-family:楷体;text-align:center;">床前明月光</h2>
<h2 style="font-family:楷体;text-align:center;">疑是地上霜</h2>
<h2 style="font-family:楷体;text-align:center;">举头望明月</h2>
<h2 style="font-family:楷体;text-align:center;">低头思故乡</h2>
<!-- ********* End ********* -->
</div>
</body>
</html>
第3关:用内嵌式引入CSS样式
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>内嵌CSS样式</title>
<style type="text/css">
/* ********** BEGIN ********** */
body{background-image:url(https://www.educoder.net/api/attachments/1427381);background-size:cover;}
/* ********** END ********** */
div {
position:fixed;
left:400px;
top:100px;
color:#ffffff;
font-family:黑体;
text-align:center;
}
</style>
</head>
<body>
<div>
<h1>静夜思</h1>
<h2>床前明月光</h2>
<h2>疑是地上霜</h2>
<h2>举头望明月</h2>
<h2>低头思故乡</h2>
</div>
</body>
</html>
第4关:用外链式引入CSS样式
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>外链CSS样式</title>
<!-- ********** BEGIN ********** -->
<link rel="stylesheet" type="text/css" href="https://www.educoder.net/api/attachments/1433016"/>
<!-- ********** END ********** -->
</head>
<body>
<div>
<h1>静夜思</h1>
<h2>窗前明月光</h2>
<h2>疑似地上霜</h2>
<h2>举头望明月</h2>
<h2>低头思故乡</h2>
</div>
</body>
</html>
上一篇:
IDEA上Java项目控制台中文乱码
