If you're getting your answers from another website, please link to the source!
This technique, of course, isn't actually applying the CSS to half the character, it's duplicating the character using a pseudo-element and positioning it over top of the original. But it looks like it does the job
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.
Megan posted this at 13:25 — 19th August 2015.
She has: 11,421 posts
Joined: Jun 1999
Not that I've ever come across! What is the use case, just out of curiosity?
rachi posted this at 11:21 — 16th September 2015.
They have: 1 posts
Joined: Mar 2015
Yes it is possible to apply css to half of a character
X
.halfStyle {
position:relative;
display:inline-block;
width:1;
font-size:80px;
color: black;
overflow:hidden;
white-space: pre;
}
.halfStyle:before {
display:block;
z-index:1;
position:absolute;
top:0;
width: 50%;
content: attr(data-content);
overflow:hidden;
color: #f00;
link removed
Megan posted this at 14:08 — 16th September 2015.
She has: 11,421 posts
Joined: Jun 1999
The above answer was copied from this Stack Overflow post:
http://stackoverflow.com/questions/23569441/is-it-possible-to-apply-css-...
If you're getting your answers from another website, please link to the source!
This technique, of course, isn't actually applying the CSS to half the character, it's duplicating the character using a pseudo-element and positioning it over top of the original. But it looks like it does the job
Megan
Connect with us on Facebook!
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.