Copy CSS generates Cascading Style Sheet (CSS) properties from shape or text layers. The CSS is copied to the clipboard and can be pasted into a style sheet. For shapes it captures values for the following:
Copying CSS from a layer group containing shapes or text creates a class for each layer as well as a Group class. The Group class represents a parent div containing child divs that correspond to the layers in the group. The top/left values for the child divs are in relation to the parent div.
The Copy CSS command does not work with Smart Objects or when selecting multiple shape/text layers that are not grouped.
From an expert: New CSS Support in Photoshop
Stephen Nielson shows how to quickly export CSS code for text and shape styling, and also import color swatches from HTML and CSS files.
For more information on creating web pages with Photoshop, see Slicing web pages.