gpt4 book ai didi

html - 悬停在 HTML/CSS 示例中不起作用

转载 作者:太空宇宙 更新时间:2023-11-03 20:34:44 25 4
gpt4 key购买 nike

我对 HTML 和 CSS 还很陌生。这是直接取自 Jon Duckett 的书的示例。

<!DOCTYPE html>
<html>
<head>
<style type="text/css">

body {
font-family: Arial, Verdana, sans-serif;
color: #111111;}
table {
width: 600px;}
th, td {
padding: 7px 10px 10px 10px;}
th {
text-transform: uppercase;
letter-spacing: 0.1em;
font-size: 90%;
border-bottom: 2px solid #111111;
border-top: 1px solid #999;
text-align: left;}
tr.even {
background-color: #efefef;}
tr.hover {
background-color: #c3e6e5;}
.money {
text-align: right;}

</style>

</head>
<body>
<h1>First Edition Auctions</h1>
<table>
<tr>
<th>Author</th>
<th>Title</th>
<th class="money">Reserve Price</th>
<th class="money">Current Bid</th>
</tr>

<tr>
<td>E.E. Cummings</td>
<td>Tulips & Chimneys</td>
<td class="money">$2,000.00</td>
<td class="money">$2,642.50</td>
</tr>

<tr class="even">
<td>Charles d'Orleans</td>
<td>Poemes</td>
<td class="money"></td>
<td class="money">$5,866.00</td>
</tr>
<tr>
<td>T.S. Eliot</td>
<td>Poems 1909 - 1925</td>
<td class="money">$1,250.00</td>
<td class="money">$8,499.35</td>
</tr>

<tr class="even">
<td>Sylvia Plath</td>
<td>The Colossus</td>
<td class="money"></td>
<td class="money">$1,031.72</td>
</tr>
</table>
</body>
</html>

可以查看输出here , hover 也不起作用。

看起来像the example on his website工作正常。我不确定我的代码做错了什么。看起来不错。

我使用的浏览器是 Chrome 48.0.2564.97。

最佳答案

:hover 是一个伪类。

前面是冒号 (:) 而不是句点 (.)

关于html - 悬停在 HTML/CSS 示例中不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35181387/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com