更改< td>的字体大小标题属性? [英] Change font size of <td> title attribute?

查看:193
本文介绍了更改< td>的字体大小标题属性?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

更改标题属性字体大小最简单的方法是什么?

解决方案

您不能: title 属性以系统特定且非HTML的方式显示。



要调整它们的外观,在鼠标悬停时显示您自己的div(或使用现有的气泡库)。






这里是一个使用jQuery的最小的bubble库:

  [data-bubble]')。hover(function(e){
if(window.bubble)window.bubble.remove();
bubble = $('< div>',{
text:$(this).data('bubble'),
css:{
position:'fixed',
top:e.pageY,left:e.pageX,
background:'yellow'
}
})appendTo(document.body);
},function(){
window.bubble.remove
});

用法:

 code>< span data-bubble =some Text> HOVER THIS< / span> 

示范



我会让你做你喜欢的syling。如果你不使用jQuery,我让你把它移植到vanilla-js,我想你得到了想法。


What's the simplest way to change the title attribute font size?

解决方案

You can't : the title attributes are displayed in an system specific and non HTML way.

To tune how they look, you'll have to build and display your own divs on mouse hovering (or use an existing "bubble" library).


On request :

Here's a minimal "bubble" library, using jQuery :

$('[data-bubble]').hover(function(e){
  if (window.bubble) window.bubble.remove();
  bubble = $('<div>', {
    text: $(this).data('bubble'),
    css: {
      position:'fixed',
      top:e.pageY, left:e.pageX,
      background:'yellow'
    }
  }).appendTo(document.body);
}, function(){
  window.bubble.remove();
});

Usage :

<span data-bubble="some Text">HOVER THIS</span>  

Demonstration

I'll let you do the syling you like. If you don't use jQuery, I let you port it to vanilla-js, I think you get the idea.

这篇关于更改&lt; td&gt;的字体大小标题属性?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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