有没有办法模仿< mark>标签与CSS? [英] Is there a way to emulate the <mark> tag with CSS?
本文介绍了有没有办法模仿< mark>标签与CSS?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的意思是,除了 background-color
之外,是否有一个属性可以实现这个功能?我不喜欢使用HTML,如果CSS可以完成同样的事情。
创建一个css类,然后按照你的喜好调用它,让我们说 - my_mark。
.my_mark {
background-color:yellow;
}
use是一个普通的类,你得到了一个解决方案。
I mean, is there a property that does essentialy this, other than background-color
? I don't like to use HTML if the same thing can be done with CSS.
解决方案
You can't, but here is a solution: make a css class, and call it however you like, lets say - "my_mark".
.my_mark{
background-color: yellow;
}
use is as a regular class and you got yourself a solution.
这篇关于有没有办法模仿< mark>标签与CSS?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文