在线
客服

发布
需求

天盟
APP

天盟APP下载

关注
微信

微信扫一扫访问
顶部

4个都没变化,且opacity=0属性没用

只是第一个出现了变化,有颜色有三角形,但是后面4个无论怎么点都没变化即使是移到上面也毫无变化,怎么回事?


.st-container input:checked + a,
.st-container input:checked:hover + a{
        background-color: #821134;
        /*设置被选中了颜色恒定不变*/
}


.st-container input:checked + a:after{
        content:"";
        width:0;
        height:0;
        overflow: hidden;
        border: 20px solid transparent;
        border-bottom-color: #821134;
        position:absolute;
        bottom: 100%;
        left:50%;
        margin-left: -20px;
        /*使三角形居中的方法*/
        /*温习下:after的用法*/
}


.st-container input:hover + a{
        background: #AD244F;
        /*鼠标滑过的背景颜色发生变化*/
}

免责声明:本内容仅代表回答会员见解不代表天盟观点,请谨慎对待。

版权声明:作者保留权利,不代表天盟立场。

使用道具 举报

全部参与2

谢谢,经过一天的努力已经把她完完全全做出来了...

使用道具 举报

试了下代码能出
.st-container{height:100px;width:200px;position:relative;}.st-containerinput:checked+a,.st-containerinput:checked:hover+a{background-color:#821134;/*设置被选中了颜色恒定不变*/}.st-containerinput:checked+a:after{content:"";width:0;height:0;overflow:hidden;border:20pxsolidtransparent;border-bottom-color:#821134;position:absolute;bottom:100%;left:50%;margin-left:-20px;/*使三角形居中的方法*//*温习下:after的用法*/}.st-containerinput:hover+a{background:#AD244F;/*鼠标滑过的背景颜色发生变化*/}sdfasdfsdfsdfasdfsdfsdfasdfsdfsdfasdfsdf

使用道具 举报

发新帖
国内首家创新型IT技术需求众包服务平台,软件需求就上天盟网! 立即登录 立即注册