我知道這是我第一次來 stackoverflow,但我希望有人能幫助我。我剛剛開始我的網路編程之旅。
第一個代碼給了我想要的頁腳:
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8" />
<title>Klausur Web Programming</title>
<style type="text/css">
footer {
width: 800px;
border-top: 1px solid black;
text-align: right;
}
footer p {
text-transform: uppercase;
</style>
</head>
<body>
<footer>
<p>web programming Klausur © 2021</p>
</footer>
</body>
</html>
第二個顯示更多添加的代碼和頁腳的不同結果,我無法解釋原因。邊框頂部在哪里:1px 實心;?或文本對齊:對;?
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8" />
<title>Klausur Web Programming</title>
<style type="text/css">
.firstcol {
font-weight: bold;
}
td {
}
border: 1px dashed black;
footer {
width: 800px;
border-top: 1px solid black;
text-align: right;
}
footer p {
text-transform: uppercase;
}
</style>
</head>
<body>
<div class="container">
<p style="text-decoration: underline;">Hier ist die Notenliste für das aktuelle Semester:</p>
<table>
<tr>
<th class=”firstcol” id=”firstcol”>Name</th>
<th>Matrikelnummer</th>
<th>Note</th>
</tr>
<tr>
<td class=”firstcol”>Paul</td>
<td>123456</td>
<td>1,0</td>
</tr>
<tr>
<td class=”firstcol”>Paula</td>
<td>123457</td>
<td>1,0</td>
</tr>
</table>
</div>
<footer>
<p>web programming Klausur © 2021 </p>
</footer>
</body>
</html>
謝謝
uj5u.com熱心網友回復:
您的第二個代碼中有一些錯誤。請把它改成這樣:
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8" />
<title>Klausur Web Programming</title>
<style type="text/css">
.firstcol {
font-weight: bold;
}
td {
border: 1px dashed black;
}
footer {
width: 800px;
border-top: 1px solid black;
text-align: right;
}
footer p {
text-transform: uppercase;
}
</style>
</head>
<body>
<div class="container">
<p style="text-decoration: underline;">Hier ist die Notenliste für das aktuelle Semester:</p>
<table>
<tr>
<th class=”firstcol” id=”firstcol”>Name</th>
<th>Matrikelnummer</th>
<th>Note</th>
</tr>
<tr>
<td class=”firstcol”>Paul</td>
<td>123456</td>
<td>1,0</td>
</tr>
<tr>
<td class=”firstcol”>Paula</td>
<td>123457</td>
<td>1,0</td>
</tr>
</table>
</div>
<footer>
<p>web programming Klausur © 2021 </p>
</footer>
</body>
</html>
轉載請註明出處,本文鏈接:https://www.uj5u.com/ruanti/421143.html
標籤:
