css - 为什么左侧菜单中的最后 3 个 <a> 没有填充它们包含的 <li>?

标签 css hyperlink hover html-lists

http://www.briligg.com/toll.html

文本部分中的最后 3 个列表项仅当您的鼠标悬停在它们的最右侧时才显示为链接。那也是唯一触发 :hover 背景颜色变化的地方。前两个工作正常。 css 验证。 html 中有一堆验证错误,但没什么大不了的。

我想不通。

相关的 css 是 briligg.css 文档中的第 66 到 121 行,以及 html 文档的 head 部分的第 9 到 47 行。 html代码从第79行到第117行。

外部CSS:

.menutop, .menubottom, .menunow  {
        float: left;
        width: 120px;
        position: absolute;
    }
.menutop li, .menubottom li {
    list-style: none;
    position: absolute;
    left: 0;
    margin: 10px 14px 5px 14px;
    }
.menunow li {
    border-bottom: 5px solid #52473f;
    border-top: 10px solid #52473f;
    border-left: 14px solid #52473f;
    border-right: 14px solid #52473f;
    outline: #3b3b3b solid 1px;
    padding-bottom: 3px;
    list-style: none;
    position: absolute;
    left: 0;
    }
.menutop li, .menutop a, .menubottom li, .menubottom a {
    width: 120px;
        height: 120px;
        display: block;
    }
div.textmenu {
        float: left;
        width: 150px;
        margin: 30px 10px 0 10px;
        position: relative;
        }
ul.textmenu {
        position: absolute;
        left: 0;
        }
li.textmenu {
        background-color: #52473f;
        margin-bottom: 3px;
        padding: 5px 7px;
        border: 1px solid #3b3b3b;
        width: 134px;
        list-style: none;
        text-align: right;
        color: #fd8ee2;
        }
li.textmenu a {
        text-decoration: none;
        color: #fd8ee2;
        }
li.textmenu:hover {
        background-color: #3b3b3b;
        }

内部CSS:

.menutop {
    height: 120px;
    }
.menunow {
    height: 120px;
    top: 140px;
    }
#frailty {
    top: 0;
    }
#frailty {
    background: url(images/legdrugnav.png) 0 0;
    }
#toll {
    top: 0;
    }
#toll {
    background: url(images/legdrugnav.png) 0 -120px;
    }
#option {
    top: 135px;
    }
#option {
    background: url(images/legdrugnav.png) 0 -240px;
    }
#weighing {
    top: 270px;
    }
#weighing {
    background: url(images/legdrugnav.png) 0 -360px;
    }
ul.textmenu {
    top: 275px;
    }
.menubottom {
    height: 270px;
    position: absolute;
    top: 380px;
    }

html:

<div class="textmenu">
<ul class="menutop">
    <li class="menutop" id="frailty" title="Drug Use and Abuse">
        <a href="frailty.html"></a>
    </li>
</ul>
<ul class="menunow">
    <li class="menunow" id="toll">
        <a href="toll.html"></a>
    </li>
</ul>
<ul class="textmenu">
    <li class="textmenu">
        <a href="toll.html#organized-crime">Prohibition funds organized crime</a>
    </li>
    <li class="textmenu">
        <a href="toll.html#corruption">Prohibition causes corruption</a>
    </li>
    <li class="textmenu">
        <a href="toll.html#kills">Prohibition kills</a>
    </li>
    <li class="textmenu">
        <a href="toll.html#poverty">Prohibition means poverty</a>
    </li>
    <li class="textmenu">
        <a href="toll.html#waste">Prohibition means wasted resources</a>
    </li>
</ul>
<ul class="menubottom">
<li class="menubottom" id="option" title="the option">
<a href="option.html"></a>
</li>
<li id="weighing" title="the pros and cons">
<a href="weighing.html"></a>
</li>
</ul>
</div>

最佳答案

关于css - 为什么左侧菜单中的最后 3 个 <a> 没有填充它们包含的 <li>?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3894588/

相关文章:

javascript - 加载后在网站上执行 chrome 扩展

css -/images 或/inc/css 链接在 CodeIgniter 子文件夹中不起作用

ios - 如何以编程方式更改 iOS 中超链接的默认颜色?

html - 无法通过CSS让子菜单悬停在父菜单下

css - SVG 使用元素和 :hover style

jquery - 将鼠标悬停在区域上时图像映射中的错误

jquery - 强制 <nav> 在响应式标题离开屏幕后跟随在固定位置

使用变换 : rotate 时悬停的 CSS 动画停留在最后一个关键帧

javascript - 如果我没有分页会发生什么?只是继续循环发布...为什么需要分页,用于页脚?

java - 刷新超链接文本