CSS Change Border Color on Hover

后端 未结 3 729
清歌不尽
清歌不尽 2021-01-17 10:14

I\'m using the following CSS code to create a box around some content/links:

.box {
    border-top-left-radius: 25px;         


        
3条回答
  •  死守一世寂寞
    2021-01-17 10:43

    You can use color instead of border-color which inherits the color of the border as well:

    .box {
    border:2px solid;
    color: #000;
    }
    
    .box:hover {
    color:purple;
    }
    

    See this demo here.

提交回复
热议问题