0

First of all Thank you for the solutions,

I want to create a progress bordered div using HTML and CSS. Similar to the attached image. I need it with rounded borders.

progress border

1 Answer 1

7

:root {
  --count: 60%;
}

body {
  display: flex;
  min-height: 100vh;
  margin: 0;
}

div {
  margin: auto;
  width: 200px;
  height: 160px;
  border-radius: 20px;
  position: relative;
  border: 1px solid #ddd;
  background-color: white;
}

div::after {
  content: '';
  display: block;
  position: absolute;
  left: -3px;
  top: -3px;
  right: -3px;
  bottom: -3px;
  background-color: transparent;
  background-image: conic-gradient(orange, orange var(--count), transparent var(--count));
  z-index: -100;
  border-radius: 21.5px;
}
<div></div>

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.