慕九州5109875
<div class="add"> </div>
.add{
position: relative;
width: 120px;
height: 120px;
margin: 200px;
color: #ccc;
border: 1px solid;
transition: color .5s;
}
.add::before,
.add::after{
content: "";
width: 60px;
height: 60px;
position: absolute;
left: 50%;
top: 50%;
}
.add::before{
margin-top: -5px;
margin-left: -30px;
border-top: 10px solid;
}
.add::after{
margin-top: -30px;
margin-left: -5px;
border-left: 10px solid;
}
.add:hover{
color: red;
cursor: pointer;
}你看看这样的可以不

橡子米米
贴代码看一下
heisback
li a{
display: block;
width: 100px;
height: 80px;
border: 1px solid;
box-sizing: border-box;
position: relative;
}
a:before{
content: "";
width: 60px;
height: 60px;
border-top: 10px solid;
position: absolute;
top: 35px;
left: 20px;
}
a:after{
content: "";
width: 60px;
height: 60px;
border-left: 10px solid;
position: absolute;
top: 10px;
left: 45px;
}
慕粉2216174813
前面是简写 一般一句就搞定 不用后面那么麻烦
林思思是猪
transition实现元素的过度效果,语法格式:transition : transition-property || transition-duration || transition-timing-function || transition-delay;
分别表示:过度的属性,时间,方式,延迟时间。
这里只说明方式:linear(速度不变),ease(默认值,缓慢开始,缓慢结束),ease-in(先慢后快),ease-out(先快后慢),ease-in-out(和ease有所差别,但差别不大)
基于内核的方式在此不多说明,相信学习css的你会知道的。
qq_简简单单爱_0
不是插入的图片,用css写的形状。
qq_刺猬先生_03549865
<div class="add"></div>
.add{
width:100px;
height:100px;
border:1px solid;
color:#ccc;
transition:color 0.25s;
position:relative;
}
.add:before{
content:" ";
display:block;
width:60px;
height:10px;
border-color:#ccc;
border-top:10px solid;
position:absolute;
top:50%;
left:50%;
margin: -5px 0 0 -30px ;
}
.add:after{
content:" ";
display:block;
width:10px;
height:60px;
border-color:#ccc;
border-left:10px solid;
position:absolute;
top:50%;
left:50%;
margin:-30px 0 0 -5px;
}
.add:hover{
color:#f6c;
}
qq_野火燎原_0
.add{
width:100px;
height:100px;
border:1px solid;
color:#ccc;
transition:color 0.25s;
position:relative;
}
.add:before{
content:" ";
display:block;
width:60px;
height:10px;
border-color:#ccc;
border-top:10px solid;
position:absolute;
top:50%;
left:50%;
margin: -5px 0 0 -30px ;
}
.add:after{
content:" ";
display:block;
width:10px;
height:60px;
border-color:#ccc;
border-left:10px solid;
position:absolute;
top:50%;
left:50%;
margin:-30px 0 0 -5px;
}
.add:hover{
color:#f6c;
}
xh向日葵4282116
对的啊,border你设置1px solid; 不设置color,border默认会把边框的颜色变成你字体的color,所以边框的颜色就跟你字体的颜色一样了,然后当你悬浮hover的时候你只需改变color的值边框就会随之改变
龙晓秀