CSS brochure: Media attributes

Source: Internet
Author: User
CSS attributes:
1. Media
One of the most important features of a style sheet is that it can act on a variety of media, such as pages, screens, and electronic synthesizer. A specific attribute can only be applied to a specific media. For example, the "font-size" attribute is only valid for the volatile media type (screen ).
To declare a media attribute, you can use @ import or @ media to introduce it:
@ Import url(loudvoice.css) speech;
@ Media print {
/* Style sheet for print goes here */
}
You can also introduce media in the document tag:
<LINK rel = "stylesheet" type = "text/css" media = "print" href = "foo.css">
It can be seen that the difference between @ import and @ media is that the former introduces external style sheets for media types, and the latter directly introduces media attributes. @ Import is used to add the URL address of the style sheet file and the media type. Multiple media can share one style sheet, and the media types are separated by commas. @ Media the rule is to put the media type before it. Other rules are basically the same as rule-set. Various media types are listed below:
SCREEN: A computer SCREEN.
PRINT: specifies the opaque media used for the printer.
PROJECTION: displays projects.
BRAILLE: a BRAILLE system, a print with a tactile effect.
AURAL: voice synthesizer.
TV: TV media.
HANDHELD: hand-held Display device (small screen, monochrome)
ALL: Suitable for ALL media.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.