js卷曲_卷曲的下划线

js卷曲

js卷曲

Ever wanted to use un underline on a web page that looks like a spelling mistake in Word? You know, the curly red underline. It's actually very easy.

是否曾经想过在看起来像Word中的拼写错误的网页上使用un下划线? 你知道的,红色的下划线。 实际上非常简单。

Here's an example.
这是一个例子。

All you need is:

所有你需要的是:

  • Curly underline

    A small piece of the wavy line, like this (it's stretched here for the demo purpose)

    波浪线的一小部分,像这样(此处出于演示目的而进行了拉伸)

  • A style that uses the image as background

    一种使用图像作为背景的样式
  • Align the background at the bottom and repeat only on the x-axis

    在底部对齐背景,仅在x轴上重复

The style definition would look like:

样式定义如下所示:

.curly-underline {
    background: url(underline.gif) bottom repeat-x;
}

And that's it!

就是这样!

I saw this working in TinyMCE, the WYSIWYG editor used by WordPress, for displaying spelling mistakes. Really cool!

我在WordPress使用的WYSIWYG编辑器TinyMCE中看到了此功能,用于显示拼写错误。 真酷!

Note: If you're a frequent visitor to my site and the example doesn't work for you, chances are you're using a cached version of the CSS file.

注意:如果您经常访问我的网站,但该示例不适合您,则很可能您正在使用CSS文件的缓存版本。

Tell your friends about this post on Facebook and Twitter

FacebookTwitter上告诉您的朋友有关此帖子的信息

翻译自: https://www.phpied.com/curly-underline/

js卷曲

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值