我如何在HTML工具提示中使用回车? [英] How can I use a carriage return in a HTML tooltip?

查看:107
本文介绍了我如何在HTML工具提示中使用回车?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我现在正在向我们的网站添加详细的工具提示,我希望(不必诉诸于一个专业的jQuery插件,我知道有很多!)使用回车来格式化工具提示。 p>

要添加提示,我使用 title 属性。我浏览了通常的网站并使用了以下基本模板:

 < a title ='工具?提示?开?提示< / a>的新行>链接

我尝试将替换为:


  • < br />

  • &安培; 013; /&#13;

  • \r\\\

  • Environment.NewLine (我正在使用C#)


    以上都不是。是否有可能?

    解决方案

    这很简单,你会踢自己...只需按Enter!

     < a title ='工具
    提示

    上新建
    线路>链接尖端< / A>

    Firefox根本不会显示多行工具提示 - 它将不会替换换行符。

    I'm currently adding verbose tooltips to our site, and I'd like (without having to resort to a whizz-bang jQuery plugin, I know there are many!) to use carriage returns to format the tooltip.

    To add the tip I'm using the title attribute. I've looked around the usual sites and using the basic template of:

    <a title='Tool?Tip?On?New?Line'>link with tip</a>
    

    I've tried replacing the ? with:

    • <br />
    • &013; / &#13;
    • \r\n
    • Environment.NewLine (I'm using C#)

    None of the above works. Is it possible?

    解决方案

    It's so simple you'll kick yourself... just press enter!

    <a title='Tool
    Tip
    On
    New
    Line'>link with tip</a>
    

    Firefox won't display multi-line tooltips at all though - it will replace the newlines with nothing.

    这篇关于我如何在HTML工具提示中使用回车?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆