HTML study notes, html notes

Source: Internet
Author: User
Tags html notes

HTML study notes, html notes

1. video tag

Src: Path

Height: height

Width: width

Autoplay: automatic playback after video Loading

Controls: controls provides temporary operation buttons for playing.

<Video src = "audio/shake.wav" height = "1000px;" width = "1000px;" autoplay = "autoplay" controls = "controls"> </video>

2. audio tag

Same as above

<Audio src = "audio/friendshipping" autoplay = "autoplay" controls = "controls"> </audio>

3. canvas

<Canvas id = "c1" onmousemove = "asm (event)" onmouseout = "ost ()"> </canvas>

3.1 draw a regular rectangle

 

Var PC3 = document. getElementById ("c1"); var c2d = cc1.getContext ("2d"); // obtain the Drawing Object c2d. fillStyle = "# 0000FF"; // fill the c2d style. strokeStyle // border style c2d. fillRect (150,175, 10,); // start point x, y width and height-border c2d. strokeRect (150,175, 10,); // start point x, y width and height-fill mode function asm (e) {var x = e. clientX; // obtain the value of X var y = e. clientY; // obtain the document value of Y. getElementById ("show "). innerHTML = "X:" + x + "-y:" + y;} function ost () {document. getElementById ("show "). innerHTML = "";}

 

3.2 draw a triangle

<Canvas id = "ca1"> </canvas> var can1 = document. getElementById ("ca1 "). getContext ("2d"); can1.moveTo (); can1.lineTo (); can1.lineTo (); can1.fill (); // fill can1.stroke (); // draw a boundary

 

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.