client - Why should I use CSS3 buttons? -
i built website recently, , decided create buttons depress on click css3, pretty cool.
but there valid reason use css3 on sprite, modern browsers show css3 buttons?
the client asked me question, , think of less http requests, loading faster. can see clients point of view pretty week answer.
is there better reason?
or there fallback method able move sprites background-position, or change gradient , add box shadow on hover / focus?
just writing made me wonder if modernizer challenge...
this more ethical , business question tech question, let's see points.
first, think client should not know tech details implementation. he/she should know he/she needs know, , that's enough.
you shouldn't "i'll make site css3, new html5 elements, , nice javascript eye-candy effects" non-tech folk. "i can make site you."
if question using or why think best approach, reply benefits.
it lightweight, brings less problems compatibility, , easier maintain. => reduce time his/her client waiting website load, everytbody can see it, , cost less in future requirements.
css3 not new revolutionary stuff, should face these technologies evolutionary. previous rules still apply, including fallback rules.
css sprites technique made css2, should work browser, including old ones (not sure ie6).
gradients new. ff 3.5+, ie9 beta, opera , webkit browsers display them. ie8 or older don't. thing box-shadows.
for these, added simple rules fallback.
when develop, put link main stylesheet on page's header, , use ie conditional comment load ie stylesheets , scripts.
on ie stylesheet, add hacks or fallbacks needed make little decent. have ms filters handle that. ie.css stylesheet like:
.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 }
note there fallbacks rules these, handle ie6, ie7 , ie8+. it's tiny , ensure better display.
beside suggest read http://24ways.org/2009/ignorance-is-bliss
modernizr lib, think if need it. may end using bulldozer instead of spoon.
Comments
Post a Comment