从css添加标题属性 [英] add title attribute from css
本文介绍了从css添加标题属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何将css中的title ='mandatory'添加到以下
中: < label class ='mandatory'名称< / label>
.mandative
{
background-image:url(/media/img/required.gif);
background-position:top right;
background-repeat:no-repeat;
padding-right:10px;
font-weight:bold;
}
解决方案
CSS是一种表示语言。它不是为添加内容而设计的(除了:
之前和:
之后) p>
How to add title='mandatory' from css to the following
<label class='mandatory'>Name</label>
.mandatory
{
background-image:url(/media/img/required.gif);
background-position:top right;
background-repeat:no-repeat;
padding-right:10px;
font-weight:bold;
}
解决方案
You can't. CSS is a presentation language. It isn't designed to add content (except for the very trivial with :before
and :after
).
这篇关于从css添加标题属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文