CSS multiple text-decoration

 ̄綄美尐妖づ 提交于 2019-12-05 19:30:49

问题


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?


回答1:


You need to space separate them:

text-decoration: underline overline line-through;

http://jsfiddle.net/PamjT/




回答2:


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



来源:https://stackoverflow.com/questions/9882443/css-multiple-text-decoration

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!