top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

I want to use CSS for a half character ? How can i do it ?

+1 vote
763 views
I want to use CSS for a half character ? How can i do it ?
posted May 13, 2014 by Nimish

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button
Download the plugin https://github.com/arbelh/HalfStyle and follow the readme.

1 Answer

0 votes

.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); /* dynamic content for the pseudo element */
overflow:hidden;
color: #f00;
}
This works on any dynamic text, or a single character, and is all automated. All you need to do is add a class on the target text and the rest is taken care of.

answer May 18, 2014 by Vrije Mani Upadhyay
Similar Questions
0 votes

I want to add a menu to my application screens. The menu will have the menu icons which are horizontal scroll-able one menu at a time when left or right arrow pressed.

...