Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
993 views
in Technique[技术] by (71.8m points)

html - Is there a way to emulate the <mark> tag with CSS?

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...