自定义标签在ie8中不起作用 [英] custom tags not working in ie8
本文介绍了自定义标签在ie8中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我尝试制作自定义标签,以便用户可以输入文本,当显示为HTML时,该文本显示为红色或粗体等,
I tried making custom tags so that uses can enter text that displays something with red or bold etc when rendered as HTML for eg,
<rb>text here becomes red and bold</rb> and goes to default here
这将在类为'note'的div中呈现,并且我设置了以下CSS
this gets rendered in a div with class 'note' and i have the following css set up
.note rb
{
color:Red;
font-weight:bold;
}
它在ie9,chrome,firefox中工作,但在ie8中不工作.我该如何在这里工作?
It works in ie9, chrome, firefox but doesnt work in ie8. How can I make it work there?
推荐答案
为了取悦高级浏览器(IE8和更早的版本),我将使用类似的东西:
To please the senior browsers ( IE8 and older) I would just go with something like:
HTML:
<span class="RB">text here becomes red and bold</span> and goes to default here
CSS:
.RB {color:Red; font-weight:bold; }
这以所有RB
类为目标.因此,您只需要将所有内容包装在
This targets all the RB
classes. So you only need to wrap everything inside
<span class="RB">
</span>
这篇关于自定义标签在ie8中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文