设置工具提示文本的特定部分要大胆使用不同的字体颜色 [英] setting particular part of the tool tip text to be bold with different font color

查看:181
本文介绍了设置工具提示文本的特定部分要大胆使用不同的字体颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对在ASN asp.net和放大器的图像工具提示; C#.NET,我想设置工具提示文本的特定部分要大胆使用不同的字体颜色,

i have tool tip for an image in asn asp.net & c#.net and i want to set particular part of the tool tip text to be bold with different font color,

这怎么办呢?

推荐答案

下面是一些不错的CSS-只提示行为,你可以使用自定义您的工具提示:的 http://meyerweb.com/eric/css/edge/popups/demo.html 这是用做 :内悬停选择为跨度元素 A

Here is some nice CSS-only tooltip behavior which you could use to customize your tooltips: http://meyerweb.com/eric/css/edge/popups/demo.html which is done by using :hover selector for span element inside a.

HTML

<a href="http://sample.com/">Links<span>Tooltip text</span></a>

CSS:

div#links a span {display: none;} // hide our tooltip SPAN.
div#links a:hover span {
  display: block; // show our tooltip
  // position/style tool-tip here.
}

包含一个&LT;跨度&GT;粗体文字此处&lt; / SPAN&GT; 从这个例子中,工具提示跨度和CSS样式它适当的范围内。如

Try including a <span>bold text here</span> within the tooltip span from this example and style it appropriately with css. Such as

div#links a span span {font-weight: bold;}

一个简单的例子这里。在这个例子中,你将添加以下样式来代替:

A simpler example here.. In this example you would add the following style instead:

a.info span span {font-weight: bold;}

这篇关于设置工具提示文本的特定部分要大胆使用不同的字体颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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