我刚开始阅读SVG Essentials这本书,示例 2-2 中有一些我不明白的地方。“HTML 文件中的内联 SVG”。
“Look Ma,Same Font!”的字体大小 text 大于 "And here is regular HTML again...",而两者的样式相同,实际上没有样式并使用默认值。这是示例中的代码(另见此处):
<head>
<style>
svg {
display:block;
width:500px;
height:500px;
margin: auto;
border: thick double navy;
background-color: lightblue;
}
body {
font-family: cursive;
}
circle {
fill: lavender;
stroke: navy;
stroke-width: 5;
}
</style>
</head>
<body>
<h1>Inline SVG in HTML Demo Page</h1>
<svg viewBox="0 0 250 250" xmlns="http://www.w3.org/2000/svg">
<title>An SVG circle</title>
<circle cx="125" cy="125" r="100"/>
<text x="125" y="125" dy="0.5em" text-anchor="middle">Look Ma, Same Font!</text>
</svg>
<p>And here is regular HTML again...</p>
</body>
</html>
任何想法我在这里想念什么?