IT Band of Brothers CSS3 Tutorial HTML5 CSS3 properties Secret 5

 

5f16a58a57bc47108e1c532aebeafd05.jpg

 

9 transparent property

Transparent element is our usual style, using filters property in the CSS2 opacity to achieve transparency effects. Now, with CSS3 of rgba property, would not be too much trouble, of course, they have to support the job browser. Usually we define the colors are expressed in hexadecimal. For example, background: # 000000, represents the background color is black. Of course, RGB tristimulus values ​​may be represented by, e.g., background: rgb (0,0,0), said background color is black. A RGBA just added a RGB on the basis of this A represents transparency. And this property does not inherit down quilt element can be used when the attribute definition color. Application code is as follows:

2cfb26a4a2c24f75814cc6cae0c40769.png

In addition to IE, other browsers support almost all rgba function. This function has four parameters, the first three parameters of RGB values ​​of a color, the fourth parameter is the transparency.

 

10 rotation properties

In CSS3 you may be used to rotate the elements transform property, zoom, tilt, pan. Rotation, for example, code as follows:

31ae360ecb5e4eaf94a9b0d2be8f6a1d.png

In addition to an earlier version of IE, other browsers can use the rotate function to rotate an object to achieve. For example rotate (7.5deg) represent clockwise 7.5 ° (degree). CSS3 use, can also complete skew (twist) and scale (zoom), and css transitions (dynamic Transform) operations and the like.

 

11 server-side font properties

When designing web pages, you might use a particular font. If the user's machine is not installed this font, so text can only be displayed in a normal font. CSS3 allows the user's browser to download the font server itself, so you can present the effect the designer wants. Sample code is shown below:

02e31d5f59664ec89111c82477e885f7.png

Note that the font files must come from the same domain name and Web page documents, in line with "same-origin policy" browser. In addition, because the Chinese font file is too large, server-side font apparently only available in English fonts.

Guess you like

Origin www.cnblogs.com/itxdl/p/11833454.html