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.