CSS生成的内容可以为您解决此问题:div { position: relative;} /* Main div for border to extend to 50% from bottom left corner */div:after { content:""; background: black; position: absolute; bottom: 0; left: 0; height: 50%; width: 1px;}(注意- content: "";为了使伪元素能够呈现,声明是必需的)