css的并列元素的hover鼠标悬停边框变色

2024-12-05 00:34:22
推荐回答(1个)
回答1:




    
    Document
    
        .parent{
            width: 300px;
            height: 100px;
            overflow: hidden;
            background: yellow;
        }
        .parent>div{
            width: 96px;
            height: 96px;
            border: 2px solid #000;
            float: left;
        }
        .parent>div:hover{
            border-color: red;
        }
    


    
        
1

        
2

        
3

    


这样样子并不会盖住呀!

相关问答