Unicode character for “X” cancel / close?

前端 未结 17 1975
我在风中等你
我在风中等你 2021-01-29 17:18

I want to create a close button using CSS only.

I\'m sure I\'m not the first to do this, so does anyone know which font has an \'x\' the same width as height, so that it

17条回答
  •  面向向阳花
    2021-01-29 17:49

    You can use text that is only accessible to screen readers by placing it in a span which you hide in an accessible way. Place the x in the CSS which can't be read by screen readers, thus won't confuse, but is visible on the page, and also accessible by keyboard users.

    
    
    
    

提交回复
热议问题