Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

.halfStyle:before includes positioning like: "position:absolute; top: 0; left:0;" which puts the :before element on top of the existing element.

"width: 50%" says it's only half as wide.

The possibly fancy thing being used here is the use of "attr(data-content)" which use the data-content attribute of the element to fill the pseudo-element's content.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: