fix(dev:docs): Improve SVG signatures
This commit is contained in:
parent
af0dcc9784
commit
630fa96417
2 changed files with 24 additions and 4 deletions
|
@ -9,8 +9,21 @@ SVG document.
|
|||
|
||||
## Signature
|
||||
|
||||
```svg
|
||||
```js
|
||||
Defs svg.defs = {
|
||||
list = {
|
||||
buttonhole: `<g id="buttonhole" transform="scale(1)">
|
||||
<path class="mark" d="M -1,-5 L 1,-5 L 1,5 L -1,5 z"></path>
|
||||
</g>`,
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
Result:
|
||||
```
|
||||
<defs>
|
||||
/* svg.defs will be inserted */
|
||||
<g id="buttonhole" transform="scale(1)">
|
||||
<path class="mark" d="M -1,-5 L 1,-5 L 1,5 L -1,5 z"></path>
|
||||
</g>
|
||||
</defs>
|
||||
```
|
||||
|
|
|
@ -7,9 +7,16 @@ section of the SVG document.
|
|||
|
||||
## Signature
|
||||
|
||||
```svg
|
||||
```js
|
||||
String svg.style += 'circle {stroke:black;}'
|
||||
```
|
||||
|
||||
Result:
|
||||
```
|
||||
<style type="text/css">
|
||||
/* svg.style will be inserted */
|
||||
circle {
|
||||
stroke: black;
|
||||
}
|
||||
</style>
|
||||
```
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue