[英]Aligning text with svg image
How can I put the next next to the svg object.如何将 next 放在 svg 对象旁边。
the result I get is :我得到的结果是:
The result I want is adding the text next to the svg image:我想要的结果是在 svg 图像旁边添加文本:
Here is the HTML:这是 HTML:
<div class="alert alert-success smallFont" id="instruction">
<object data="images/information.svg" type="image/svg+xml" id="object">
<p id="mapsInstructionOne" class="mapsInstructionOne" align="center"></p>
</object>
</div>
You can achieve this with CSS and with a change in the markup:您可以使用 CSS 并更改标记来实现此目的:
HTML: HTML:
<div class="alert alert-success smallFont" id="instruction">
<p id="mapsInstructionOne" class="mapsInstructionOne" align="center"></p>
<object data="images/information.svg" type="image/svg+xml" id="object"></object>
</div>
And then in your CSS file, you can use a float for the paragraph tag:然后在您的 CSS 文件中,您可以为段落标记使用浮点数:
#mapsInstructionOne {
float: right;
}
Depending on how you want the text to wrap, you could also choose to float the object tag instead.根据您希望文本如何换行,您还可以选择浮动对象标签。 In this case -在这种情况下 -
HTML: HTML:
<div class="alert alert-success smallFont" id="instruction">
<object data="images/information.svg" type="image/svg+xml" id="object"></object>
<p id="mapsInstructionOne" class="mapsInstructionOne" align="center"></p>
</div>
CSS: CSS:
#object {
float: left;
}
Note: These examples remove the paragraph tag from being a child of the object tag.注意:这些示例将段落标记从对象标记的子项中删除。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.