Why should I use CSS3 buttons?

I recently created a website and decided to create buttons that click on CSS3, pretty cool.

But is there really a good reason to use CSS3 over a sprite, since only modern browsers show CSS3 buttons?

The client asked me this question, and all I could think of was fewer HTTP requests, so downloading would be a little faster. I see from the point of view of customers that this is a pretty weekly answer.

Is there a better reason?

Or is there a fallback method that could move the background position of the sprites or change the gradient and add a window shadow when hovering / focusing?

Just writing it made me wonder if the modernizer can handle the problem ...

+3
source share
1 answer

This is a much more ethical and business issue than a technical issue, but let's look at some points.

First, I think that your client does not need to know all the technical details about the implementation. He / she must know what he needs to know, and that is enough.

This is not to say: "I will make your site with CSS3, new HTML5 elements and nice javascript eye candy effects" for non-technical people. Just say, "I can make a good site for you."

If he asks what you use or why you think this is the best approach, then you respond with benefits.

, , . = > , , .

CSS3 - , , . , .

CSS Sprites - , CSS2, , ( IE6).

. FF 3.5+, IE9 beta, Opera webkit . IE8 . - .

.

, , IE IE.

IE , , , . MS, . IE.css :

.gradient {
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#E6E6E6', endColorstr='#fff');
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr='#E6E6E6', endColorstr='#fff')";
}

.boxShadow {
filter: progid:DXImageTransform.Microsoft.Shadow(Color=#666666, direction=135, strength=5);
-ms-filter: "progid:DXImageTransform.Microsoft.Shadow(Color=#666666, direction=135, strength=5)";
box-shadow: 5px 5px 5px #666
}

, , IE6, IE7 IE8+. .

, http://24ways.org/2009/ignorance-is-bliss

Modernizr - , , . , .

+5

Source: https://habr.com/ru/post/1768362/


All Articles