通过伪类元素:after为其添加样式,用transform:scaleY令其在垂直方向缩小0.5倍
.div:after{ height: 1px; transform: scaleY(0.5); transform-origin: 50% 100%; // 要指定origin值, 要不然会模糊 content: ""; position: absolute; width: 100%; left: 0; bottom: 0; background: red; }
通过伪类元素:after为其添加样式,用transform:scaleY令其在垂直方向缩小0.5倍
.div:after{ height: 1px; transform: scaleY(0.5); transform-origin: 50% 100%; // 要指定origin值, 要不然会模糊 content: ""; position: absolute; width: 100%; left: 0; bottom: 0; background: red; }
本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。