Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fade from normal text to italics text smoothly?

Is there a way to make it so when my user hovers over normal text that is an anchor, the text smoothly transitions into oblique or italicized text to show it is a link (including an underline)

Here's an example of what I'm trying to do...

<a href="http://oldsite.com">
<p class="footertext">Take me to the old site...</p>
</a>

p.footertext {
font-size:12px;
padding-left:4px;
text-decoration:none; }
p.footertext:hover {
/*text:decoration: "italicize smoothly"*/ }
like image 841
C Bonner Avatar asked Sep 14 '13 05:09

C Bonner


People also ask

How do I convert text to italics?

You can then select text, click Bold, Italic or Underline or you can press Control + B, Control + U, Control + i to change the formatting.

What is the difference between italic and oblique?

According to the spec, “Italic forms are generally cursive in nature while oblique faces are typically sloped versions of the regular face.” However, if the font being used does not have italic or oblique faces available, in most cases there is little, if any, difference between italic and oblique.

Is italics easier to read?

One influential study from 1998 compared the responses of test participants reading a screen with regular Verdana type to one with Verdana italics. There was no difference in reading comprehension or speed, but participants rated the regular type as easier to read, sharper, and generally more legible.

What key changes italicize text styles?

To make your selected text italic or start writing text in italic, press the Ctrl + I keys on your keyboard.


2 Answers

You can use CSS3 transform functions to simulate italic text. You can also use CSS3 transitions to get the smooth transition you're looking for.

.italic {
    -moz-transition: all 1s;
    -webkit-transition: all 1s;
    -o-transition: all 1s;
    transition: all 1s;
}

.italic:hover {
    -webkit-transform: skewX(-20deg);
    -moz-transform: skewX(-20deg);
    -o-transform: skewX(-20deg);
    transform: skewX(-20deg);
}

JSFiddle

like image 99
Austin Brunkhorst Avatar answered Sep 30 '22 11:09

Austin Brunkhorst


No. Skewed text is not the same as italicized text. An italic font is not simply a skewed font, it is completely different. You can maybe cross-fade dissolve between the two, but skewed does not give you proper italicized text.

like image 36
eablokker Avatar answered Sep 30 '22 11:09

eablokker