0

嗨,我有一个如下所示的 div

<div id="iconArrow"><img src="footer.jpg" width="35" height="27" style="position:fixed;"></div>

我需要在图像右侧添加一个文本“更多”。请帮我检查最终输出的示例图像。

添加代码后 在此处输入图像描述

4

2 回答 2

1

它可能与 HTML5 有关。

HTML5

<figure>
  <img src="footer.jpg" width="35" height="27">
  <figcaption>More</figcaption>
</figure>

CSS

figure {
    position: fixed;
}
figure > * {
    float :left;
}

这是一个jsFiddle

于 2013-09-17T12:06:24.283 回答
1

如果您希望固定图像并且想在其旁边添加文本,我建议您将图像标签包装在另一个具有固定位置的 div 中,然后执行以下操作:

<div id="wrapper" style="position: fixed;width: 35px;height: 27px;">
    <img src="footer.jpg" width="35" height="27" /><div style="position: absolute;right: 0">your note</div>
</div>
于 2013-09-17T12:06:35.860 回答