I have an expanding line animation in css as can be seen in the demo link
I would like some help in figuring out how to add a vertical line at both ends when the animation stops.
Something like the attached image:
Can someone please help me with this?
Perhaps using pseudo elements
.line::before,
.line::after
{
content: ''; /* important for pseudo elements */
width: 4px;
height: 20px;
position: absolute;
background: red;
}
.line::after { right: 0 } /* snap to right */
.line::before { left: 0 } /* snap to left */
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.