top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration

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

+1 vote
92 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 Google+ Share Button LinkedIn Share Button Multiple Social 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.

Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...