I want to apply CSS to half word of character only, means I would like to create a character effect in which we have One-half of character as Blue color while another half as black or transparent white.
How to achieve it using pure CSS or javascript/CSS combination?
Yes there are ways with the help of which you can style half character or word using CSS
Example : jsFiddle
Another plugin, Splitchar can be used to styling of word or charcter using CSS
You can use this pure CSS solution, which will work in webkit and Chrome
h1 {
display: inline-block;
margin: 0; /* for demo snippet */
line-height: 1em; /* for demo snippet */
font-weight: bold;
font-size: 400px;
font-family:Arial;
background: linear-gradient(to right, #7db9e8 50%,#1e5799 50%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
HTML:
<h1>Z</h1>
Output:
here is the Fiddle example
Subscribe to our weekly Newsletter & Keep getting latest article/questions in your inbox weekly