Trying to draw image in css

61 Views Asked by At

i'm trying to so save network requests,thats why i want to implement close button of my mobile page in CSS. I used img2css website to generate the css, here is my solution: But it looks pretty bad in old mobile devices : Here is a screenshot from Android 4.3 At the left side is my css solution at the right side the original image. So as you see the css is a bit ugly. Any suggestions how to draw this simple close button in CSS?

1

There are 1 best solutions below

1
On

You can simplify this an awful lot, and learn some basic css:

span.close
{
  display:block;
  width:32px;
  height:32px;
  color:#666;
  border:1px solid #666;
  border-radius:50%;
  font-size:28px;
  line-height:1;
  text-align:center;
}
 <span class="close">&times;</span>