0
点赞
收藏
分享

微信扫一扫

使用伪元素让左侧出现一个竖着的红色长条

就是耍帅 2022-04-17 阅读 5
css3
.scroll-item {
			background-color: #ffffff;
			position: relative;

			&::before {
				content: '';
				display: block;
				width: 3px;
				height: 50%;
				background-color: red;
				position: absolute;
				top: 50%;
				left: 0;
				transform: translateY(-50%);
			}
		}

举报

相关推荐

0 条评论