Canvas plotting in HTML5-creating a progressive PPT background

Source: Internet
Author: User

The background of the PPT is quite nice. In fact, some are images and some are gradient images. Today I tried to make a progressive PPT background image (for special purposes ), the radial gradient rectangle of canvas is used. In fact, there is nothing special.CodeRight

View code

 <!  Doctype html  >  <  Html  >  <  Head  >  <  Meta  Charset  = "UTF-8" >  <  Title  > Canvas </  Title  >  <  Meta  Name  = "Keywords"  Content  = "Canvas"  >  <  Meta  Name = "Description"  Content  = "Canvas HTML5"  >  </  Head  >  <  Style  Type  = "Text/CSS"  >  Canvas  {  Border :  Dashed 1px # ccc  }  </  Style  >  <  Script  Type  = "Text/JavaScript"  >      Function  $ (ID ){  Return Document. getelementbyid (ID );}  Function  Pageload (){  VaR  Can  =  $ (  '  Can  '  ); VaR  Cans  =  Can. getcontext (  '  2d  '  );  VaR  Gnt1  = Cans. createradialgradient (  600  ,  300  ,  0  ,  400  ,  700  ,  800 ); Gnt1.addcolorstop (  1  ,  '  # Bdbdbd  '  ); Gnt1.addcolorstop (  0  ,  '  # F3f3f3 '  ); Cans. fillstyle  =  Gnt1; cans. fillrect (  0  ,  0  ,  800  ,  600 ); Cans. Fill ();}  </  Script  >  <  Body  Onload  = "Pageload ();"  >      <  Canvas  ID  = "Can"  Width  = "800px"  Height = "600px"  > </  Canvas  >  </  Body  >  </  Html  > 

Previous

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.