我正在创建一个 HTML 帮助文件(是的,是的,我知道它是老式的,但微软尚未提供更新的替代品)。
当我在普通浏览器中打开文件时,文本会按照我的预期显示。但是当我在 HTML 帮助查看器中打开文件时,每个<dd>
元素中的第一行都会缩进,这是我不想要的。
这是我的 CSS 文件。
body
{
color: #111;
font-family: Arial, Helvetica, Sans-Serif;
font-size: 12px;
}
dt {
font-weight: bold;
margin-top: 8px;
margin-bottom: 8px;
}
dd {
margin-left: 18px;
}
pre {
color: blue;
}
这是我的 HTML 的一部分。
<!doctype html public "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<head>
<meta http-equiv="Content-Type" Content="text/html; charset=Windows-1252">
<title>CYGNUSSTATEINFO Structure</title>
<link href="Style.css" rel="stylesheet" type="text/css" />
</head>
<h1>CYGNUSSTATEINFO Structure</h1>
<p>
The CYGNUSSTATEINFO structure contains information about the current state and settings of the Cygnus application. This information may be useful for programming extensions that need more information about the data being processed. This structure contains the following members.
</p>
<dt>HWND hCygnusWnd</dt>
<dd>
A handle to the main Cygnus window.
</dd>
<dt>LPWSTR lpszCurrFile</dt>
<dd>
A Unicode string that specifies the name of the current file being edited. Note that this member is for display purposes only and does not contain a fully qualified path.
</dd>
<dt>int nStartOffset</dt>
<dd>
Specifies the offset of the start of any selection. This may be useful when it is necessary to know the offset of the data being processed. This member is zero if there is no selection associated with the current task.
</dd>
<dt>int nBytesPerRow</dt>
<dd>
Specifies the current number of bytes per row.
</dd>
<dt>int nOffsetRadix</dt>
<dd>
Specifies the current offset radix. This is the notation used to show the offset of each row. It will be 16 for hexadecimal, 10 for decimal.
</dd>
<dt>int nGroupBy</dt>
<dd>
Specifies the number of bytes per group in the hex portion of the display. This value is one if there is no byte grouping.
</dd>
<!-- Etc.... -->
</body>
</html>
谁能理解为什么第一行在这里缩进?我试过设置text-indent: 0
没有成功。我也尝试将 DOCTYPE 更改为<!doctype html>
,但没有任何改变。