问题描述
我对在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-只提示行为,你可以使用自定义您的工具提示:的这是用做 :内悬停
选择为跨度
元素 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;}
这篇关于设置工具提示文本的特定部分要大胆使用不同的字体颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!