Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I overlay a ProgressSpinner in PrimeNG?

I have a progressBar spinner like this :

<p-progressSpinner></p-progressSpinner>

I want to make it center and overlay. How can I do that ?

Thanks .

like image 916
BenMansourNizar Avatar asked Jan 02 '23 13:01

BenMansourNizar


1 Answers

This works for me: Original Url

html

<div class="progress-spinner" *ngIf="true">
    <p-progressSpinner></p-progressSpinner>
</div>

css

.progress-spinner {
    position: fixed;
    z-index: 999;
    height: 2em;
    width: 2em;
    overflow: show;
    margin: auto;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
}

/* Transparent Overlay */
.progress-spinner:before {
  content: '';
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.53);
}
like image 146
Sampath Avatar answered Jan 12 '23 03:01

Sampath