小编Zey*_*ch'的帖子

忽略 CSS 中悬停的边距

当我将鼠标悬停在正方形上时,我制作了一个小弹出窗口,但即使有现有边距,我也想转到此弹出窗口。

这是我的 HTML 和 CSS 代码的片段:

.vertical {
    height: 70px;
    width: 70px;
    border-radius: 5px;
    margin-bottom: 10px;
    margin-right: 10px;
    border: solid lightgrey;
    position: relative;
}

.frame {
    height: 100%;
}

.st {
    height: 250px;
}

.info {
    visibility: hidden;
    position: absolute;
    top: 0;
    left: 120%;
    margin-left: -5px;
    border-radius: 5px;
    border: solid black 1px;
    color: white;
}

.vertical:hover .info {
    visibility: visible;
}

.arrow {
    position: absolute;
    right: 100%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: transparent rgba(2, 0, 0, 0.75) transparent …
Run Code Online (Sandbox Code Playgroud)

css hover

5
推荐指数
1
解决办法
2354
查看次数

标签 统计

css ×1

hover ×1