6

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"*/ }
4

2 回答 2

13

您可以使用CSS3 转换函数来模拟斜体文本。您还可以使用CSS3 过渡来获得您正在寻找的平滑过渡。

.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

于 2013-09-14T06:02:36.207 回答
3

不可以。倾斜文本与斜体文本不同。斜体字体不仅仅是一种倾斜的字体,它是完全不同的。您可以在两者之间交叉淡入淡出溶解,但倾斜不会给您正确的斜体文本。

于 2013-09-14T07:26:31.523 回答