[英]How can I create buttons like those on the Apple website?
Take your pick from these google results Or search on your own for "CSS Sprites". 从这些Google搜索结果中进行选择,或者自行搜索“ CSS Sprites”。 The basic technique is you put all the various states and images in one graphic, and then you use the
:hover
pseudo slector to change the background-position
declaration to move the background image to the coordinates that contain the proper state(s). 基本技术是将所有各种状态和图像放在一个图形中,然后使用
:hover
伪滑移器更改background-position
声明,以将背景图像移动到包含适当状态的坐标。
As an alternative to prodigitalson suggestion (which is the way Apple does it), you could consider using current CSS 3 styles. 作为prodigitalson建议(Apple这样做的一种方法)的替代方法,您可以考虑使用当前的CSS 3样式。
Gradients: http://www.webdesignerwall.com/tutorials/cross-browser-css-gradient/ Text Shadows (for embosed text): http://www.w3.org/Style/Examples/007/text-shadow.en.html Roundedc corners: http://www.css3.info/preview/rounded-border/ 渐变: http : //www.webdesignerwall.com/tutorials/cross-browser-css-gradient/文字阴影(用于浮雕文字): http : //www.w3.org/Style/Examples/007/text-shadow。 en.html Roundedc角落: http : //www.css3.info/preview/rounded-border/
etc. 等等
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.