这是问题:http: //jsfiddle.net/Coffeeh/SVwsW/
.a{
width: 0px;
height: 0px;
}
.L {
border-top: 50px solid transparent;
border-left: 50px solid #ff0000;
border-bottom: 50px solid transparent;
float: left;
}
.L:hover{
border-left: 50px solid #ffcc00;
}
.T {
border-right: 50px solid transparent;
border-top: 50px solid #ff0000;
border-left: 50px solid transparent;
}
.T:hover{
border-top: 50px solid #ffcc00;
}
.B {
border-right: 50px solid transparent;
border-bottom: 50px solid #ff0000;
border-left: 50px solid transparent;
}
.B:hover{
border-bottom: 50px solid #ffcc00;
}
.R {
border-top: 50px solid transparent;
border-right: 50px solid #ff0000;
border-bottom: 50px solid transparent;
float: right;
}
.R:hover{
border-right: 50px solid #ffcc00;
}
任何想法如何使这 4 个三角形 div 在悬停时完美工作?
具有 1 个 4 边框 div 的选项不符合要求
已解决:http: //jsfiddle.net/Coffeeh/tg3ER/