小编Web*_*ter的帖子

在儿童悬停时更改父母的CSS

我想在Child元素的悬停时更改父级的css.

<ul id="main-menu">
        <li>
            <a href="#">
                <i class="fa fa-building-o" aria-hidden="true"></i>
                Private Limited
                <i class="fa fa-caret-down"></i>
            </a>
            <ul class="submenu">
                <li><a href="#0">Company</a></li>
                <li><a href="#0">Contact</a></li>
                <li><a href="#0">Industry</a></li>
            </ul>
        </li></ ul>
Run Code Online (Sandbox Code Playgroud)

我想要的是如果我徘徊在子菜单的 li上,主菜单的 li 会突出显示.

css html5 css3

11
推荐指数
2
解决办法
3万
查看次数

悬停停止动画在各自的位置

我有两个div,其中有一个圆圈和一个smily,其中innercircle1 div正在旋转给定的动画.我想要的是当我将鼠标悬停在innercircle1 div上时,它应该停止但是使用它们当前的变换原点位置,目前当我将鼠标悬停在innercircle1 div上时,它会转到它们的起点,即它们给定的变换原点和停止点.

   body {
        background: #000;
        color: #fff;
    }

    @keyframes circle {
        from {
            transform: rotate(0deg);
        }

        to {
            transform: rotate(360deg);
        }
    }

    @keyframes inner-circle {
        from {
            transform: rotate(0deg);
        }

        to {
            transform: rotate(-360deg);
        }
    }

    .outercircle {
        border: 1px solid red;
        border-radius: 50%;
        width: 310px;
        margin: 64px auto;
        height: 310px;
        position: Relative;
    }

    .innercircle {
        width: 100px;
        height: 100px;
        margin: 20px auto 0;
        color: orange;
        font-size: 100px;
        line-height: 1;
        animation: circle 5s linear …
Run Code Online (Sandbox Code Playgroud)

html javascript css html5 css3

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

标签 统计

css ×2

css3 ×2

html5 ×2

html ×1

javascript ×1