JavaScript: The Definitive Guide, Sixth Editio javaScript权威指南(第6版) pdf 文字版-文字版, javascript电子书, 和javascript 有关的电子书:

16.2.1.2 CSS positioning example: Shadowed text

Nonpositioned elements (i.e., elements with default position:static positioning) are always laid out in a way that prevents overlaps, so the z-index property does not apply to them. Nevertheless, they have a default z-indexof zero, which means that positioned elements with a positive z-index appear on top of the normal document flow and positioned elements with a negative z-index appear beneath the normal document flow.


16.2.1.2 CSS positioning example: Shadowed text

The CSS3 specification includes a text-shadow property to produce drop-shadow effects under text. It is supported by a number of current browsers, but you can use CSS positioning properties to achieve a similar effect, as long as you are willing to repeat and restyle the text to produce a shadow:

Shadowed

Shadowed

Shadowed

The text to be shadowed is enclosed in a relatively positioned element. There are no position properties set, so the text appears at its normal position in the flow. The shadow is in an absolutely positioned inside (and therefore positioned relatively to) the relatively positioned . The z-index property ensures that the shadow appears underneath the text that produces it.

欢迎转载,转载请注明来自一手册:http://yishouce.com/book/1/31444.html
友情链接It题库(ittiku.com)| 版权归yishouce.com所有| 友链等可联系 admin#yishouce.com|粤ICP备16001685号-1