我正在使用html
和css
来编写考试,我已经创建了一个<div>
课程,用于为学生提供写作答案空间的问题。
然而,代码不起作用,我无法弄清楚问题是什么。以下是不 - 工作代码的示例。
请帮助我理解为什么这不符合预期。
<html>
<head>
<style type="text/css">
body, pre {
font-family: serif;
margin-left: 12%;
margin-right: 12%;
text-align: justify;
font-size: 110%;
{
.shortAnsw {
padding-bottom: 5cm;
}
.longAnsw {
padding-bottom: 10cm;
}
.answer {
display: none;
}
</style>
</head>
<body>
<h1>Exam 1</h1>
<p>
<strong> Please write your name only on the back of the last page of the exam. </strong>
</p>
<h2>Short Answer</h2>
<p>
Please answer the following questions in no more than 3 sentences.
</p>
<ol>
<li>
<div class="longAnsw">
question 1
</div>
</li>
<li>
<div class="shortAnsw">
question 2
</div>
</li>
<li>
<div class="shortAnsw">
question 3
</div>
</li>
</ol>
</body>
</html>
答案 0 :(得分:3)
你有一个向后{
。
body, pre {
font-family: serif;
margin-left: 12%;
margin-right: 12%;
text-align: justify;
font-size: 110%;
{
答案 1 :(得分:1)