VML programming-Background VML polar path Tutorial: Mu Yuanhua

Source: Internet
Author: User
Original VML polar path Tutorial: Mu Yuanhua
Chapter 1 Section 15: Background

 1: Background-Details You may have been wondering how the yellow and white gradient backgrounds on the content pages of "VML polar path tutorial" are made? In fact, it is very simple. The background (webpage background control mark) mentioned in this chapter is used to complete this task. Before explaining how to do this, compare the following examples: Code Difference, do not remember! Example of parallel gradient filling: <HTML xmlns: V> <style> V \: * {behavior: URL (# default # VML) ;}</style> <body>
<Div style = 'height: 2000 '> </div>
<V: Background fillcolor = "yellow">
<V: fill type = 'gradient' color2 = "Purple"/>
</V: Background>
Example of refraction gradient filling: <HTML xmlns: V> <style> V \: * {behavior: URL (# default # VML) ;}</style> <body>
<Div style = 'height: 2000 '> </div>
<V: Background fillcolor = "white">
<V: fill type = 'gradientradial 'color2 = "red"/>
</V: Background>
Example of parallel gradient + Angle Adjustment: <HTML xmlns: V> <style> V \: * {behavior: URL (# default # VML) ;}</style> <body>
<Div style = 'height: 2000 '> </div>
<V: Background fillcolor = "white">
<V: Fill angle = 50 type = 'gradient 'color2 = "yellow"/>
</V: Background>
How is it? The third example is a bit similar, right? But not yet. See the following example of parallel gradient + Angle Adjustment + contrast and melting: <HTML xmlns: V> <style> V \: * {behavior: URL (# default # VML) ;}</style> <body>
<Div style = 'height: 2000 '> </div>
<V: Background fillcolor = "white">
<V: Fill angle = 50 type = 'gradient' colors = "50% # f1f0c7"/>
</V: Background>
OK. The fourth example is finally implemented! Looking back at the above four examples, one conclusion is that the code is "similar ". In addition, the VML second-level mark-fill (fill) is used, while the background mark itself only has the ID and fillcolor attributes, which cannot implement background gradient and must be used with the second-level mark-fill. The second-level tags (fill filling processing, stroke border processing, extrusion three-dimensional processing, etc.) are often the same as common attributes, it is not specially designed for a certain level-1 mark (oval circle, roundrect circle rectangle, line, Background, etc.), but can be applied to multiple level-1 marks, affects the graphic effect of the output or representation of a level-1 mark. At present, there is no time to talk about the second-level mark. This chapter only requires you to briefly understand the syntax of the second-level mark, learn more about VML's powerful graphic effect processing functions and the rich attributes of level 2 tags! And knowing that the background is used in this way, it completes the gradient effect of the webpage background color. In the above 4 codes, <Div style = 'height: 2000 '> </div> is not required, in the example 4, it is used to lengthen the webpage length and better display effect. The second-level mark stroke border processing and fill filling processing will be described in detail in subsequent chapters. After that, you can apply the level-2 tag to the level-1 tag to achieve various graphic processing effects.

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.