I'm trying to make a progress bar with the CSS attr function, here is my code :
.progress_bar { height: 10px; width: 10cm; background-color: #cae3ff; } .progress { height: inherit; width: attr(progress); background-color: #0077ff; transition: 1s cubic-bezier(1,0,0,1); } <div class="progress_bar"> <div class="progress" progress="80%"></div> </div> As you can see by running the code snippet, the bar doesn't work, I read the docs about the attr function and still I don't find the problem, could you help me please ?