HTML5 new features: Drawing WeChat logo with SVG, html5svg

Source: Internet
Author: User

HTML5 new features: drawing a logo with SVG, html5svg

HTML5 new feature
Some interesting new features in HTML5:
1. canvas elements used for painting
2. video and audio elements used for media playback
3. Better support for local offline storage
4. New special content elements, such as article, footer, header, nav, and section
5. New Form controls, such as calendar, date, time, email, url, and search
SVG image drawing:


The Code is as follows:

The Code is as follows:
<Style>
*{
Padding :;
Margin :;
}
Body {
Background-color: # ddd;
}
. Container {
Width: px;
Height: px;
Position: relative;
Top: px;
Left: %;
Transform: translated (-% ,,);
Background-color: # c;
Border-radius: px;
Box-shadow: px # cbfbf;
}
. Container object {
Position: relative;
Top: px;
Left: px;
}
</Style>
<Body>
<Div class = "container">
<Object data = "logo. svg" width = "" height = "" type = "image/svg + xml"/>
</Div>
</Body>

This is the code in xml format, which is separated from html documents.

The Code is as follows:
<? Xml version = "." standalone = "no"?>
<! DOCTYPE svg PUBLIC "-// WC // dtd svg. // EN"
Http://www.w.org/Graphics/SVG/./DTD/svg.dtd>
<Svg width = "%" height = "%" version = "." xmlns = "http://www.w.org//svg">
<Ellipse cx = "" cy = "" rx = "" ry = "" style = "fill: rgb (,); stroke: rgb (,,); stroke-width: "/>
<Circle cx = "" cy = "" r = "" style = "fill: # c; stroke-width:"/>
<Circle cx = "" cy = "" r = "" style = "fill: # c; stroke-width:"/>
<Polygon points = "," style = "fill: # fff; stroke-width:"/>
<Ellipse cx = "" cy = "" rx = "" ry = "" style = "fill: # c; stroke-width:"/>
<Ellipse cx = "" cy = "" rx = "" ry = "" style = "fill: rgb (,); stroke: rgb (,,); stroke-width: "/>
<Circle cx = "" cy = "" r = "" style = "fill: # c; stroke-width:"/>
<Circle cx = "" cy = "" r = "" style = "fill: # c; stroke-width:"/>
<Polygon points = "," style = "fill: # fff; stroke-width:"/>
</Svg>

The above is a small part of the HTML5 new features that we will share with you. We hope to help you.

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.