.b_btn { width: 135px; height: 40px; position:relative; } .b_link { display: block; position: absolute; left: 0; bottom: 0; width: 135px; color: #fff; font-size: 18px; text-align: center; border-radius: 6px; transition: all 2s ease; line-height:1.4; z-index:1; } .b_line { position: absolute; width: 100%; height: 10px; z-index: -1; left: 0; bottom: 0; background: #ff0000; transition: all 1s ease; } .b_link:hover { height: 40px; line-height: 40px; } .b_link:hover .b_line { height: 40px; }