Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
3.3k views
in Technique[技术] by (71.8m points)

html - How do I centre a non-bootstrap progress bar vertically?

I am trying to make a progress bar with some text and the progress bar aligned vertically. How can I achieve this? I have tried some other answers but they just won't work.

.div-shadow {
  box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12) !important;
  width: 80%;
  margin-top: 2rem !important;
  margin-bottom: 1rem;
  margin: auto;
}

p {
  font-family: 'Roboto', sans-serif;
  text-align: center;
  font-size: 2rem;
  color: #fff;
  margin: 0;
  margin-top: 0.2%;
  margin-left: 5%;
  margin-right: 5%;
  padding-bottom: 1%;
  align-items: flex-start;
}

progress {
  float: right;
}
<div class="div-shadow">
  <p style="text-align: left; margin-left: 2%; margin-right: 2%; padding-bottom: 0;">
    JavaScript
    <progress value="15" max="100" style=""></progress>
  </p>
</div>

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...