css-calc,transform-matrix,transtion配合hover来用 小小程序员02 2018-07-13 360 阅读1分钟 a{ width: calc(100% - 100px); // a标签的宽度为父元素的100%再减去100px } a{ transform: matrix(0.866,0.5,-0.5,0.866,0,0); // a标签2d转换,cool } a{ width: 500px; transtion: .3s all ease-in-out; } a:hover{ width: 100px; }