Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CSS multiple text-decoration

I want to have the <h2> underlined and blinking at the same time.
Is there any way to achieve this modifying only the CSS style of <h2>?

For instance:

h2 {
  text-decoration: underline, blink;
}

or

h2 {
  text-decoration: underline;
  text-decoration: blink;
}

none of the above works

If there is no such way what is the fastest/easiest way to do it?

like image 934
zakkak Avatar asked Mar 27 '12 02:03

zakkak


2 Answers

You need to space separate them:

text-decoration: underline overline line-through;

http://jsfiddle.net/PamjT/

like image 190
powerbuoy Avatar answered Oct 07 '22 08:10

powerbuoy


Easiest is to set border-bottom to your h2:

h2 { 
   border-bottom:1px solid black;
   text-decoration:blink;
}

Please note that blink isn't supported in IE, Chrome and Safari

like image 27
Andreas Wong Avatar answered Oct 07 '22 09:10

Andreas Wong