html - 如何在进度条之后插入文本

标签 html css progress-bar

我有一个 jquery 进度条,我需要在进度条之后插入一些文本。 但是文本位于进度条下方。请让我知道如何解决这个问题。 我试过使用:

<div id="progressbar" style="width:150px;height:25px;"></div><div>Lesson 2</div>

最佳答案

您可以使用display:inline-block

HTML:

<div id="progressbar" style="width:150px;height:25px;"></div>
<div id="text">Lesson2</div>

CSS:

#progressbar{
    background-color:red;
    display: inline-block;
}
#text{
    display: inline-block;
}

DEMO

关于html - 如何在进度条之后插入文本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21482458/

相关文章:

html - 可滚动的 tbody 不占用所有可用宽度

javascript - 如何从特定点加载网页

html - 固定 SVG 高度和可变 (100%) 宽度

java - 带有 apache 常见电子邮件的进度条

android - 使用 ProgressBar.setProgressDrawable 的颜色问题

c# - 在 MainWindow 中更改 UserControl 的可见性

html - 我需要有关使用 first-child 和 last-child CSS 选择器的帮助

javascript - 我正在尝试添加关闭功能

html - CSS 变换 3d 立方体偏移

html - 图解说明 : only move the text and not the background+text