<div class="out"></div>
不使用伪类
.out{ content: " "; width: 200px; height:1px; background-color: red; -webkit-transform: scaleY(0.5); -ms-transform: scaleY(0.5); transform: scaleY(0.5); }二.使用伪类
<div class="bottom"></div>.bottom:after { content: " "; width: 100%; border-bottom: 1px solid red; -webkit-transform: scaleY(0.5); -ms-transform: scaleY(0.5); transform: scaleY(0.5); -webkit-transform-origin: 0 0; -ms-transform-origin: 0 0; transform-origin: 0 0; position: absolute; }