HTML5 Mobile Development (CSS3 Design mobile page style)

Source: Internet
Author: User
Tags transparent color browser cache

1. How to create a CSS style sheet 2.CSS3 's outstanding features 3. Media query based on device attribute change style 4. How to create a more beautiful mobile page using attribute change meta tags  Cascading style sheets are an important part of mobile web development, and this share will learn how to write CSS and use it to customize styles for mobile pages, including media queries that customize style sheets for specific devices. Also learn about some meta tags that affect the display of mobile device content Create a good style that can be attached to a style sheet in three different ways1. Inline to the label "recommended to do this at the time of testing" 2. Embedded in the beginning of the HTML 3. In a separate document as the style sheet "Recommended Practice" * can increase the speed of the site loading, after loading the style sheet, save it in the browser cache, open the same site in the other pages do not need to reload. the syntax for using the Font property is:Font:font-style font-variant font-weight font-size/line-height font-family;to ensure that Web pages look and think the same, you can use sequential font lists, also known as font stacksBefore you lay out your Web page, you need to know the itinerary for your Web page. The default shape for each element in the document is square, even if the shape is not displayed. The simplest way is to use the border property to add a border to the element, with the following syntax: border:1px solid red; For box Model: Center for Content Area (width) filler (padding) border (border) margin (margin) CSS3 brings the following outstanding new features:Multi-column layout and grid layout rounded border graphic text and box shadow non-browser device mountain fixed rolling overflow font and typesetting modified animation three-dimensional transformation The browser does not directly support CSS3 style properties. Most Web browsers do this by adding a keyword to the property before the attribute is used to indicate that it is a browser-specific property. as follows:-moz Firefox and Mozlla-ms Internet explorer-wap WAP and Opera-o Opera-webkit Chrom and Safari after adding the relevant browser-specific extension, Before you can use many CSS3 new properties. Here are just a few examples:Rounded Corners:The fillet in the CSS3 is implemented by a property called Border-radius. Almost every developer is looking for a CSS fillet, thinking that people are tired of CSS2 's block performance. Border-bottom-left-radiusborder-bottom-right-radiusborder-top-left-radiusborder-top-right-radius of course for compatibility also consider the extension of FF and WebKitbox shadows and text ShadowsYou can use the CSS3 property Text-shadow and Box-shadow to add shadows text-shadow:horizontal-offset vertical-offset Blur-radius color for text and boxes; Text-shadow:horizontal-offset Vertical-offset Blur-radius Color;offset refers to the offset from the original element of the shadow. Blur radius is blur two; color is shadow color.Transparent Color:Before we CSS2.0 use RGB now CSS3.0 introduced RGBA is more than one channel, you can set the transparency of the fourth bit to add a number between 0 to 1, 0 is completely transparent, and 1 is completely opaque. RGBA (0, 0, 0, 0.4);

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.